Created
March 15, 2012 11:47
-
-
Save ponkore/2043831 to your computer and use it in GitHub Desktop.
Hello, Compojure #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns compojure-example.core | |
(:use compojure.core | |
ring.adapter.jetty ; <- added | |
[hiccup.middleware :only (wrap-base-url)]) | |
(:require [compojure.route :as route] | |
[compojure.handler :as handler])) | |
(defn index-page [] "<H1>Hello, world</H1>") | |
(defroutes main-routes | |
(GET "/" [] (index-page)) | |
(route/resources "/") | |
(route/not-found "Page not found")) | |
;;; deleted | |
;(def app | |
; (-> (handler/site main-routes) | |
; (wrap-base-url))) | |
;;; added | |
(run-jetty main-routes {:port 8080 :join? false}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment