Last active
May 18, 2016 19:15
-
-
Save yeehaa123/d73304e2516cf1ae4c32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns history-handler | |
(:require [compojure.core :refer [GET defroutes]] | |
[ring.util.http-response :refer :all] | |
[compojure.route :as route] | |
[hiccup.core :refer [html]] | |
[hiccup.page :refer [html5 include-js include-css]])) | |
(def index-page | |
(html | |
(html5 | |
[:head | |
[:title "Your Title"] | |
[:meta {:charset "utf-8"}] | |
[:meta {:http-equiv "X-UA-Compatible" :content "IE=edge"}] | |
[:meta {:name "viewport" :content "width=device-width, initial-scale=1.0"}] | |
(include-css "/css/sass.css")] | |
[:body | |
[:div.container [:div#app.app-wrapper | |
[:h1 "Waiting for ClojureScript to compile"]]] | |
(include-js "/js/app.js")]))) | |
(defroutes app | |
(route/resources "/js" {:root "js"}) | |
(route/resources "/css" {:root "css"}) | |
(GET "/" [] | |
(-> (ok index-page) (content-type "text/html"))) | |
(route/not-found (-> (ok index-page) (content-type "text/html")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment