playground-coffeeshop
A re-frame application designed to share playground with the world.
Development Mode
Compile css:
Compile css file once.
lein less once
Automatically recompile css file on change.
lein less auto
Run application:
lein clean
rlwrap lein figwheel dev
Figwheel will automatically push cljs changes to the browser.
Wait a bit, then browse to http://localhost:3449.
Run tests:
lein clean
lein doo phantom test once
The above command assumes that you have phantomjs installed. However, please note that doo can be configured to run cljs.test in many other JS environments (chrome, ie, safari, opera, slimer, node, rhino, or nashorn).
Production Build
lein clean
lein uberjar
That should compile the clojurescript code first, and then create the standalone jar.
When you run the jar you can set the port the ring server will use by setting the environment variable PORT. If it's not set, it will run on port 3000 by default.
If you only want to compile the clojurescript code:
lein clean
lein cljsbuild once min
Deploying to S3
Setup enviornment variables
export AWS_ACCESS_KEY_ID=... export AWS_SECRET_ACCESS_KEY=...
lein cljsbuild once min # compiles CLJS with min profile
lein s3-static-deploy
Atom watcher
(add-watch app-state :logger #(-> %4 clj->js js/console.log))