Node.js setting up environment specific configs to be used with everyauth

My solution, load the app using NODE_ENV=production node app.js Then setup config.js as a function rather than an object module.exports = function(){ switch(process.env.NODE_ENV){ case ‘development’: return {dev setting}; case ‘production’: return {prod settings}; default: return {error or other settings}; } }; Then as per Jans solution load the file and create a new instance which … Read more