Created
April 21, 2014 13:37
-
-
Save marcusoftnet/11142947 to your computer and use it in GitHub Desktop.
simpleConfigobject
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 mongoDevUri = process.env.MONGOHQ_URL || "localhost:27017/koaVote_Dev"; | |
var mongoStageUri = process.env.MONGOHQ_URL || "localhost:27017/koaVote_Test"; | |
var mongoProdUri = process.env.MONGOHQ_URL || "localhost:27017/koaVote_Prod"; | |
var config = { | |
local: { | |
mode: 'local', | |
port: 3000, | |
mongoUrl: mongoDevUri | |
}, | |
staging: { | |
mode: 'staging', | |
port: 4000, | |
mongoUrl: mongoStageUri | |
}, | |
prod: { | |
mode: 'prod', | |
port: process.env.PORT || 5000, | |
mongoUrl: mongoProdUri | |
} | |
}; | |
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