summaryrefslogtreecommitdiff
path: root/src/chef/routes.clj
diff options
context:
space:
mode:
authorTim <contact@bytim.eu>2025-05-05 21:32:52 +0200
committerTim <contact@bytim.eu>2025-05-05 21:32:52 +0200
commit79e32a55801fc53c8d60843c6676ca05cc899299 (patch)
treecf798506172445d8f7af24eee27fd2e84f2fce81 /src/chef/routes.clj
downloadchef-79e32a55801fc53c8d60843c6676ca05cc899299.tar.xz
chef-79e32a55801fc53c8d60843c6676ca05cc899299.zip
Initial commit
Diffstat (limited to 'src/chef/routes.clj')
-rw-r--r--src/chef/routes.clj13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/chef/routes.clj b/src/chef/routes.clj
new file mode 100644
index 0000000..51c721a
--- /dev/null
+++ b/src/chef/routes.clj
@@ -0,0 +1,13 @@
+(ns chef.routes
+ (:require [reitit.ring :as rring]
+
+ [chef.pages.home :as cphome]
+ [chef.pages.admin :as cpadmin]))
+
+(def router [["/" {:get {:handler cphome/handler}}]
+ ["/admin/" {:get {:handler cpadmin/handler}}]
+ ["/static/*" (rring/create-resource-handler)]])
+
+(def ring-handler (-> router
+ rring/router
+ (rring/ring-handler (rring/redirect-trailing-slash-handler))))