diff options
author | Gabriel A. Giovanini <mail@gabrielgio.me> | 2018-02-17 13:55:55 -0200 |
---|---|---|
committer | Gabriel A. Giovanini <mail@gabrielgio.me> | 2018-02-17 13:55:55 -0200 |
commit | 98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa (patch) | |
tree | 61f453e1b21634e0f2d740ff61091d182e145184 /src/clj/queue_api/handler.clj | |
download | queue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.tar.gz queue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.tar.bz2 queue-api-98056e815a6dcd36d7377d3cd823a4aaf5a3d9fa.zip |
Initial commit
Diffstat (limited to 'src/clj/queue_api/handler.clj')
-rw-r--r-- | src/clj/queue_api/handler.clj | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/clj/queue_api/handler.clj b/src/clj/queue_api/handler.clj new file mode 100644 index 0000000..97afd48 --- /dev/null +++ b/src/clj/queue_api/handler.clj @@ -0,0 +1,19 @@ +(ns queue-api.handler + (:require [compojure.core :refer [routes wrap-routes]] + [queue-api.routes.services :refer [service-routes]] + [compojure.route :as route] + [queue-api.env :refer [defaults]] + [mount.core :as mount] + [queue-api.middleware :as middleware])) + +(mount/defstate init-app + :start ((or (:init defaults) identity)) + :stop ((or (:stop defaults) identity))) + +(mount/defstate app + :start + (middleware/wrap-base + (routes + #'service-routes + (route/not-found + "page not found")))) |