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"
- Export the
BUILD_COMMAND
variable to build time environment. - Set custom
BUILD_COMMAND
. Here it iscljsbuild
followed by the clojure compilation.
Written by Aleš Roubíček
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Clojure
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#