new config

This commit is contained in:
Mario Colque 2014-01-31 15:00:48 -03:00
parent 7c808205a6
commit 2c790c518c
1 changed files with 16 additions and 3 deletions

View File

@ -4,13 +4,26 @@
* Module dependencies.
*/
var path = require('path'),
rootPath = path.normalize(__dirname + '/..');
rootPath = path.normalize(__dirname + '/..'),
env;
switch(process.env.NODE_ENV) {
case 'production':
env = 'prod';
break;
case 'test':
env = 'test';
break;
default:
env = 'dev';
break;
}
module.exports = {
root: rootPath,
appName: 'Insight',
appName: 'Insight ' + env,
port: process.env.PORT || 3000,
db: 'mongodb://localhost/insight-test',
db: 'mongodb://localhost/insight-' + env,
bitcoind: {
protocol: process.env.BITCOIND_PROTO || 'http',
user: process.env.BITCOIND_USER || 'user',