I have been working on a few Node apps, and I've been looking for a good pattern of storing deployment-related settings. In the Django world (where I come from), the common practise would be to have a settings.py
file containing the standard settings (timezone, etc), and then a local_settings.py
for deployment specific settings, ie. what database to talk to, what memcache socket, e-mail address for the admins and so on.
I have been looking for similar patterns for Node. Just a config file would be nice, so it does not have to be jammed in with everything else in app.js
, but I find it important to have a way to have server-specific configuration in a file that is not in source control. The same app could well be deployed across different servers with wildly different settings, and having to deal with merge conflicts and all that is not my idea of fun.
So is there some kind of framework/tool for this, or does everyone just hack something together themselves?