Guest User

Untitled

a guest
Oct 11th, 2015
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (ns scaffold_app.handler
  2.   ; :use statements modify the templated namespace
  3.   (:use [compojure.core]
  4.         [ring.adapter.jetty :as ring])
  5.   ; :require statements that came with the template
  6.   (:require [compojure.core :refer :all]
  7.             [compojure.route :as route]
  8.             [ring.middleware.defaults :refer [wrap-defaults site-defaults]])
  9.   )
  10.  
  11. (defroutes app-routes
  12.   (GET "/" [] "Hello World")
  13.   (route/not-found "Not Found"))
  14.  
  15. (defn -main [port] ;neither run-jetty nor handler/site resolves in this context
  16.   (run-jetty (handler/site app-routes) {:port (read-string port) :join? false}))
  17.  
  18. (def app
  19.   (wrap-defaults app-routes site-defaults))
Advertisement
Add Comment
Please, Sign In to add comment