~subsetpark/urquh

ref: ba3ec8c9e6f110cb4b11ec2f36bf1a40feebd5fa urquh/main.janet -rw-r--r-- 340 bytes
ba3ec8c9 — Zach Smith update gitignore 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(use osprey)

(import temple)
(temple/add-loader)

(import /index)

(enable :static-files)

(GET "/"
     (def body @"")
     (with-dyns [:out body]
       (index/render))
     @{:status 200
       :body body
       :headers text/html})


(defn main [_ &opt port host]
  (default port 4000)
  (default host "0.0.0.0")
  (server port host))