Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(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
You can’t perform that action at this time.