Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (ns scaffold_app.handler
- ; :use statements modify the templated namespace
- (:use [compojure.core]
- [ring.adapter.jetty :as ring])
- ; :require statements that came with the template
- (:require [compojure.core :refer :all]
- [compojure.route :as route]
- [ring.middleware.defaults :refer [wrap-defaults site-defaults]])
- )
- (defroutes app-routes
- (GET "/" [] "Hello World")
- (route/not-found "Not Found"))
- (defn -main [port] ;neither run-jetty nor handler/site resolves in this context
- (run-jetty (handler/site app-routes) {:port (read-string port) :join? false}))
- (def app
- (wrap-defaults app-routes site-defaults))
Advertisement
Add Comment
Please, Sign In to add comment