Created
December 31, 2013 02:02
-
-
Save rmaceissoft/8191283 to your computer and use it in GitHub Desktop.
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
/*global module, require, console*/ | |
/*jslint nomen: false*/ | |
var properties = { | |
// global properties go here | |
appName: "tidalwavez", | |
logs : { | |
folder : './log', | |
filename : 'server.log' | |
}, | |
mongo: { | |
db : 'wavez', | |
host : '127.0.0.1', | |
port : 27017 | |
}, | |
session : { | |
secret : "d0853b30-3d95-11e2-a25f-0800200c9a66", // uuid hash | |
maxAge : new Date(Date.now() + 300000), | |
key : 'express.sid' | |
}, | |
security : { | |
cookieSecret: 'tidalwavez-cookie-secret' | |
}, | |
// properties for development environment go here | |
development: { | |
facebook: { | |
appId: 'X', | |
appSecret: 'Y', | |
callback: "http://local.tidalwavez.com/auth/facebook/callback" | |
}, | |
twitter: { | |
consumerKey: "TWITTER_KEY", | |
consumerSecret: "TWITTER_SECRET", | |
callback: "http://local.tidalwavez.com/auth/twitter/callback" | |
//callback: "http://localhost:"+(process.env.PORT || 1337)+"/auth/twitter/callback" | |
} | |
} | |
// properties for production environment go here | |
production: { | |
facebook: { | |
appId: 'X', | |
appSecret: 'Y', | |
callback: "https://www.tidalwavez.com/auth/facebook/callback" | |
}, | |
twitter: { | |
consumerKey: "TWITTER_KEY", | |
consumerSecret: "TWITTER_SECRET", | |
callback: "https://www.tidalwavez.com/auth/twitter/callback" | |
} | |
} | |
} | |
module.exports = function(property_name) { | |
environment: process.env.NODE_ENV || 'development', | |
var value = properties[property_name]; | |
if (properties[environment][property_name]) { | |
value = properties[environment][property_name]; | |
} | |
return value; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment