diff --git a/README.md b/README.md index f631dc5..9e60de0 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,11 @@ Get Started * (boot) * Open http://localhost:8080 in your web browser: you should see a welcome message. For other URLs to try take a look into routes.clj. +Running it locally with lein +---------------------------- +* export PORT=8000 +* lein run -m samplewebapp.main-heroku + Run on Heroku ------------- First create a new app at Heroku with the cedar stack: heroku create --stack cedar @@ -18,6 +23,12 @@ To run the webapp with Heroku we need the Procfile file and main-heroku.clj. Here is a description of how to run Clojure apps on Heroku: http://blog.heroku.com/archives/2011/7/5/clojure_on_heroku/ + +Run locally +----------- +You can run it in lein locally : +lein run -m samplewebapp.main-heroku + License ------- This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See http://sam.zoy.org/wtfpl/COPYING for more details. diff --git a/src/samplewebapp/main_heroku.clj b/src/samplewebapp/main_heroku.clj index 1b7589e..24c7a68 100644 --- a/src/samplewebapp/main_heroku.clj +++ b/src/samplewebapp/main_heroku.clj @@ -1,6 +1,7 @@ (ns samplewebapp.main-heroku (:use ring.adapter.jetty) (:use samplewebapp.routes) + (:use ring.middleware.file) (:require [compojure.handler :as handler])) ; Ring provides that adapter to Jetty and the underlying HTTP requests and responses. ; Difference to main-local.clj is that automatic reloading and browser stacktrace is not available under Heroku.