diff options
Diffstat (limited to 'src/chef/routes.clj')
-rw-r--r-- | src/chef/routes.clj | 13 |
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)))) |