The RudolF blog-algorithms-site-playground!
- Jetty (server),
- Ring (Http abstraction layer for simpler sites)
- Compojure (Http forwarding and routing library)
- Hiccup (HTML representation, in Clojure)
Get Started By running locally
get dependencies (goes off to maven and grabs all the jars)
$ lein deps
start Clojure from inside the project
$ lein repl
and from inside the Clojure repl:
user=> (use 'rudolfweb.main-local) user=> (boot)
Finally : Open the page in your web browser: you should see a welcome message. For other URLs to try take a look at util.clj.
A more "herokuish" way to run locally:
- export PORT=8000 (read by Procfile deployer)
- Run the "Procfile" (run the Procile launch command, in your terminal).
Run as a new app on Heroku
First create a new app at Heroku with the cedar stack:
heroku create --stack cedar <my-app-name>
To run the webapp with Heroku we need the Procfile file and main-heroku.clj.
Example of running (easy), note the Procfile is the "driver".
Deployment to rudolfcode.heroku.com
certify your keys with heroku (email jay to add you to the heroku app authenticated users emails)
install the heroku toolbelt
git remote add heroku firstname.lastname@example.org:appname.git git remote add email@example.com:rudolfcode.git
Automated method (beta)
- push to github (this is experimental, and underway, we will see if it works).
Pushing and Pulling
this deploys the code, so make sure you run it locally first:
git push heroku master
do this any time, it just commits the code to git:
git push origin master
This is distributed under the RudolF license, which means that you can use it however you want to as long as you say good things about functional & compositional programming.