From 96a007eecea9b67ba06d01c8fcdd9c09fc4b43e9 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 4 Nov 2025 23:31:01 -0800 Subject: Initial commit --- src/controller/routes.phel | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/controller/routes.phel (limited to 'src/controller') 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)))})) -- cgit v1.3-2-g0d8e