You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Jul 29, 2026. It is now read-only.
Q: Dev/Production config settings for client? #562
I had like same question and ended up using upstart/forever script with all needed variables set as enviroment variables inside deployment host itself.
@simonh1000 I use jade as an HTML preprocessor and I typically convert index.html to a jade file as well. If that works for you, I'd suggest using express locals bound to config or process.env entries.
Wow, I must be tired... Grunt actually compiles the jade files on builds and serves, and NOT rendered by express (somehow wasn't thinking about this, only server/views is rendered). You can place your template vars in the grunt config object for the jade task under compile.config.data. You can then use grunt config strings to bind your template vars to your config/env.
Activity
gintsgints commentedon Sep 17, 2014
I had like same question and ended up using upstart/forever script with all needed variables set as enviroment variables inside deployment host itself.
kingcody commentedon Sep 18, 2014
@simonh1000 I use jade as an HTML preprocessor and I typically convert
index.htmlto a jade file as well. If that works for you, I'd suggest using express locals bound to config or process.env entries.simonh1000 commentedon Sep 18, 2014
Thanks for the idea but on this occasion I'm only deploying the client code, so Jade is not an option (unless grunt:build precompiles pages)
kingcody commentedon Sep 18, 2014
Wow, I must be tired... Grunt actually compiles the jade files on builds and serves, and NOT rendered by express (somehow wasn't thinking about this, only server/views is rendered). You can place your template vars in the grunt config object for the jade task under
compile.config.data. You can then use grunt config strings to bind your template vars to your config/env.