summaryrefslogtreecommitdiffstats
path: root/src/app.phel
blob: bcee391912ff75c90373b8dc530122fad4dac67b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(ns lezer\app
  (:require lezer\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))))