Created
February 23, 2015 01:35
-
-
Save marcusoftnet/68d7bb7bf61fb08aeb91 to your computer and use it in GitHub Desktop.
Config object
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoProdUri = process.env.MONGOLAB_URI || 'localhost:27017/myApp_Prod'; | |
var adminUser = { | |
name : process.env.BASIC_USER || 'marcus', | |
pass : process.env.BASIC_PASS || 'koavote' | |
}; | |
var config = { | |
local: { | |
mode: 'local', | |
port: 3000, | |
mongoUrl: 'localhost:27017/myApp_Dev', | |
user : adminUser | |
}, | |
staging: { | |
mode: 'staging', | |
port: 4000, | |
mongoUrl: 'localhost:27017/myApp_Test', | |
user : adminUser | |
}, | |
prod: { | |
mode: 'prod', | |
port: process.env.PORT || 5000, | |
mongoUrl: mongoProdUri, | |
user : adminUser | |
} | |
}; | |
module.exports = function (mode) { | |
return config[mode || process.argv[2] || 'local'] || config.local; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool stuff! Do we really need the || 'local' in here?