Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <my-app-name>
Expand All @@ -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.
1 change: 1 addition & 0 deletions src/samplewebapp/main_heroku.clj
Original file line number Diff line number Diff line change
@@ -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.
Expand Down