Skip to content

Latest commit

 

History

History
24 lines (14 loc) · 957 Bytes

File metadata and controls

24 lines (14 loc) · 957 Bytes

A very (very) simple example of Clojure + Compojure project that can run on Heroku's Cedar stack.

Get Requests to / will serve up

Hello World

And gets to /:name will return a {"name" : <:name arg here> } json object.

Note: defroutes (GET "/" [] ... was causing me no end of problems; it worked fine, locally, on my box but not on Heroku. Using GET "/*" fixes this but catches all request, So currently I'm just relying on route/not-found to resolve "/" requests...

The Procfile is the key to getting it running on Heroku: >web: lein run -m example.core

This is an instruction for a "web" process that tells heroku to run the -main method in core.server

Usage:

Sign up with Heroku,

Follow instruction's here: http://devcenter.heroku.com/articles/quickstart BUT create a new app on the cedar stack with: >>heroku create --stack cedar

instead of just "heroku create".

Then git push heroku master