summaryrefslogtreecommitdiff
path: root/bin/serve.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'bin/serve.fnl')
-rw-r--r--bin/serve.fnl9
1 files changed, 6 insertions, 3 deletions
diff --git a/bin/serve.fnl b/bin/serve.fnl
index 327060d..6653da9 100644
--- a/bin/serve.fnl
+++ b/bin/serve.fnl
@@ -1,4 +1,3 @@
-(local fennel (require :vendor.fennel))
(local lib (require :lib))
(when _G.unpack
@@ -189,8 +188,12 @@
(values code headers (.. "<!DOCTYPE html>\n" content)))
(values 404 {:content-type "text/html"} "not found")))))
-(luna.router.route "/" router)
-(luna.router.static "GET /static/" "static/")
+(_G.must
+ (luna.router.route "/" router))
+(_G.must (luna.router.static "GET /static" "static/" ""))
+(_G.must
+ (luna.router.static "GET /static/files"
+ "static/files" ""))
(when (= 0 (# (_G.must (luna.db.query db "SELECT name FROM users LIMIT 1" []))))
(let [password (_G.must (luna.crypto.random-string 20))