diff options
| author | unwox <me@unwox.com> | 2025-09-08 15:43:32 +0600 |
|---|---|---|
| committer | unwox <me@unwox.com> | 2025-09-08 15:43:32 +0600 |
| commit | cabcbdce77b71e24241e9aec2765501327592531 (patch) | |
| tree | 5acb8d947fcabc237bed4779a5face3d0c9196b4 /bin | |
| parent | 88d1725520afde9fe10a3daa1ad5c1c0a552f041 (diff) | |
update according to luna changes
Diffstat (limited to 'bin')
| -rw-r--r-- | bin/serve.fnl | 9 |
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)) |
