summaryrefslogtreecommitdiffstats
path: root/src/app.phel
diff options
context:
space:
mode:
authorGravatar Tom Willemse2025-11-04 23:31:01 -0800
committerGravatar Tom Willemse2025-11-04 23:31:01 -0800
commit96a007eecea9b67ba06d01c8fcdd9c09fc4b43e9 (patch)
tree5f691a3f3ec2faa0fb92b3394108cb4c63fccac5 /src/app.phel
downloadlezer-96a007eecea9b67ba06d01c8fcdd9c09fc4b43e9.tar.gz
lezer-96a007eecea9b67ba06d01c8fcdd9c09fc4b43e9.zip
Initial commit
Diffstat (limited to 'src/app.phel')
-rw-r--r--src/app.phel15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/app.phel b/src/app.phel
new file mode 100644
index 0000000..a9d8af3
--- /dev/null
+++ b/src/app.phel
@@ -0,0 +1,15 @@
+(ns web-skeleton\app
+ (:require web-skeleton\controller\routes)
+ (:require phel\router :as r)
+ (:require phel\http :as h))
+
+(def app
+ (r/handler
+ (r/router
+ [["/" {:handler routes/index-handler}]
+ ["/ping" {:name ::ping
+ :get {:handler routes/ping-handler}
+ :post {:handler routes/ping-handler}}]])))
+
+(when-not *build-mode*
+ (h/emit-response (app (h/request-from-globals))))