#30: Starting to work.

We can serve both conventional pages, and the app.
This commit is contained in:
Simon Brooke 2017-03-19 17:54:37 +00:00
parent ce9520fc2c
commit 7439e5ae15
6 changed files with 152 additions and 54 deletions

View file

@ -5,11 +5,14 @@
[ring.util.http-response :as response]
[clojure.java.io :as io]))
(defn app-page []
(layout/render "app.html"))
(defn home-page []
(layout/render "home.html"))
(layout/render "home.html" {:title "You Yes Yet?"}))
(defroutes home-routes
(GET "/" [] (home-page))
(GET "/app" [] (app-page))
(GET "/docs" [] (-> (response/ok (-> "docs/docs.md" io/resource slurp))
(response/header "Content-Type" "text/plain; charset=utf-8"))))

View file

@ -0,0 +1 @@
;; Ultimately it's the goal to use the same UI utils for both main site and single page app.