Skip to content

Instantly share code, notes, and snippets.

@yeehaa123
Last active May 18, 2016 19:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yeehaa123/d73304e2516cf1ae4c32 to your computer and use it in GitHub Desktop.
Save yeehaa123/d73304e2516cf1ae4c32 to your computer and use it in GitHub Desktop.
(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