qjrllg
Last Updated: February 25, 2016
·
1.117K
· rarous

ClojureScript build on Heroku

When you deploy Isomorphic Clojure app, you need to build your ClojureScripts during the deploy phase to prevent the app start timeout.

You can create new buildpack with cljsbuild support, but it is not necessary.

Clojure buildpack can be configured to run custom command:

heroku config:add BUILD_CONFIG_WHITELIST=BUILD_COMMAND
heroku config:add BUILD_COMMAND="lein with-profile production do cljsbuild once, compile :all"
  1. Export the BUILD_COMMAND variable to build time environment.
  2. Set custom BUILD_COMMAND. Here it is cljsbuild followed by the clojure compilation.