Skip to content

Instantly share code, notes, and snippets.

@zpratt
Created February 23, 2014 20:24
Show Gist options
  • Save zpratt/9176723 to your computer and use it in GitHub Desktop.
Save zpratt/9176723 to your computer and use it in GitHub Desktop.
node-config reusable configuration using the javascript config style.
module.exports = function (mainDir, cwd) {
'use strict';
if (!cwd) {
cwd = '';
}
return {
Default: {
projRoot: cwd + mainDir + '/src',
serverRoot: cwd + mainDir + '/src/server',
testRoot: cwd + mainDir + '/test'
},
TestVals: {
knownObjectId: "52ffef5e3242c4a82909c53f"
},
database: {
host: "localhost",
port: 27017,
name: "thoughts"
},
server: {
port: 8080
}
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment