Skip to content

Instantly share code, notes, and snippets.

@jimmyjacobson
Created March 17, 2012 19:00
Show Gist options
  • Select an option

  • Save jimmyjacobson/2064177 to your computer and use it in GitHub Desktop.

Select an option

Save jimmyjacobson/2064177 to your computer and use it in GitHub Desktop.
node js configs
var mode = process.env.NODE_ENV ? process.env.NODE_ENV : 'development';
var config = {
development: {
redis: {
host: 'localhost',
port: 6379,
auth: null
},
},
production: {
redis: {
host: 'prod host',
port: 9091,
auth: 'auth string'
},
},
staging: {
redis: {
host: 'staging host',
port: 6379,
auth: null
},
};
exports.config = config[mode];
=====
var config = require('./config').config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment