The RudolF blog-algorithms-site-playground!
It uses
- Jetty (server),
- Ring (Http abstraction layer for simpler sites)
- Compojure (Http forwarding and routing library)
- Hiccup (HTML representation, in Clojure)
-
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.
- export PORT=8000 (read by Procfile deployer)
- Run the "Procfile" (run the Procile launch command, in your terminal).
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".
First method
-
certify your keys with heroku (email jay to add you to the heroku app authenticated users emails)
-
install the heroku toolbelt
-
then:
git remote add heroku git@heroku.com:appname.git git remote add git@heroku.com:rudolfcode.git
Automated method (beta)
- push to github (this is experimental, and underway, we will see if it works).
-
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.