Advertisement
Guest User

Untitled

a guest
May 25th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (ns liberator-service.handler
  2.   (:require [compojure.core :refer [defroutes routes]]
  3.             [ring.middleware.resource :refer [wrap-resource]]
  4.             [ring.middleware.file-info :refer [wrap-file-info]]
  5.             [hiccup.middleware :refer [wrap-base-url]]
  6.             [compojure.handler :as handler]
  7.             [compojure.route :as route]
  8.             [liberator-service.routes.home :refer [home-routes]]))
  9.  
  10. (defn init []
  11.   (println "liberator-service is starting"))
  12.  
  13. (defn destroy []
  14.   (println "liberator-service is shutting down"))
  15.  
  16. (defroutes app-routes
  17.   (route/resources "/")
  18.   (route/not-found "Not Found"))
  19.  
  20. (def app
  21.   (-> (routes home-routes app-routes)
  22.       (handler/site)
  23.       (wrap-base-url)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement