dbConfig.js

function setUrl() {
	console.log('process.env.NODE_ENV: ' + process.env.NODE_ENV);
	if(process.env.NODE_ENV === 'production' || process.env.NODE_ENV === 'debug') {
		return {
			url: "mongodb://ir-admin:octoedgetm@ds023098.mlab.com:23098/inputbox-redesign",
			type: 'mongodb web'
		};
	}
	else {
		return {
			url: "mongodb://jaggib:password@127.0.0.1/inputboxDB",
			type: 'mongodb local'
		};
	}
}
mongoDbUrl = setUrl();

module.exports = {
	// the database url to connect
	// INFO using 'localhost' here makes mongodb connect fail when offline.
	db : mongoDbUrl
};