I know this topic has been done to (not quite) death since 12 factor app, but I've written another npm module for configuring your app via ENV VARS and allowing basic type support, or at least something to help on the way.
https://npmjs.org/package/yapec https://github.com/sandfox/node-yapec (yes the name doesn't quite work if you think about it hard enough but I don't really care). Simply, you specify your config as a plain JS object with every leaf being a string dictating what sort of type to expect, e.g bool,string,float,etc, then pass in object that resembles the output of process.env and it will create a new object that looks like you config except the leaf values are what it could find from the ENV VARS. It has tests etc and is meant to be a little primitive so that more advanced stuff such as validation can be provided in a higher level module. Hopefully someone else out there will find it useful. I'm open to PR's or general suggestion/abuse for my ropey javascript skills. James -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
