Skip to content

Instantly share code, notes, and snippets.

@dbushenko
Created July 15, 2011 11:07
Show Gist options
  • Save dbushenko/1084495 to your computer and use it in GitHub Desktop.
Save dbushenko/1084495 to your computer and use it in GitHub Desktop.
(defroutes main-routes
(GET "/request" request (str request))
(GET "/my" request "<html><body>Привет, Мир!</body></html>")
(route/resources "/")
(route/not-found "Page not found"))
(defn wrap-codepage [handler]
(fn [request]
(handler (assoc-in request [:headers :content-type] "text/html; charset=utf-8"))))
(def app
(-> (handler/site main-routes)
(wrap-db-access *db*)
(wrap-file "public")
wrap-file-info
wrap-codepage
wrap-session))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment