summaryrefslogtreecommitdiffstats
path: root/src/controller/routes.phel
blob: ae0cdf142de3a54c9108cd9f1efd85b18b2e3b8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
(ns web-skeleton\controller\routes
  (:require web-skeleton\view\main :refer [index-html])
  (:require web-skeleton\module\greet :as g)
  (:require phel\router :as r)
  (:require phel\http :as h))

(defn index-handler [req]
  (h/response-from-map {:status 200
                        :body index-html}))

(defn ping-handler [req]
  (h/response-from-map {:status 200
                        :body (g/greet (str "pong - " (rand)))}))