summaryrefslogtreecommitdiffstats
path: root/src/app.phel
diff options
context:
space:
mode:
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))))