diff options
Diffstat (limited to 'src/controller')
| -rw-r--r-- | src/controller/routes.phel | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/controller/routes.phel b/src/controller/routes.phel new file mode 100644 index 0000000..ae0cdf1 --- /dev/null +++ b/src/controller/routes.phel @@ -0,0 +1,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)))})) |
