linnovate/mean — pull request #129 by passkey1510 (2013-11-08 08:29:44+00:00)
Title: Use module export instead of json string

I suggest using object instead of json string for environment config. I think it should be helpful when it adds more flexibility to configure via js, especially to abstract credentials information. For example, when I want to push an application to Heroku, I would not like to set the database login and password on production.json since the same application would be pushed to GitHub, but instead I would use environment variable. A sample production.js config will look like this:

var db = 'mongodb://' + process.env.MONGOHQ_USERNAME + ':' + process.env.MONGOHQ_PASSWORD + process.env.MONGOHQ_URL;
module.exports = {
db: db
}