blob: 22b2d2d81472eb456b832e00227c68a8a6b19b53 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
(ns app.handler
(:require [castra.middleware :as castra]
[compojure.core :as c]
[compojure.route :as route]
[ring.middleware.defaults :as d]
[ring.util.response :as response]
[simpledb.core :as db]))
(c/defroutes app-routes
(c/GET "/" req (response/content-type (response/resource-response "index.html") "text/html"))
(route/resources "/" {:root ""}))
(def app
(-> app-routes
(castra/wrap-castra {:state-fn (fn [] "ohi")} 'app.api)
(d/wrap-defaults d/api-defaults)))
(db/init)
|