var parseEnv = require('parse-env');

var configTemplate = require('./config.template');
var config;

try {
    config = require('./config');
}
catch(e) {}

module.exports = parseEnv(process.env, configTemplate, config);

var parseEnv = require('parse-env');

var configTemplate = require('./config.template');
var config;

try {
    config = require('./config');
}
catch(e) {}

var env = parseEnv(process.env, configTemplate, config);

if(process.env.VCAP_SERVICES){
    var vcap = JSON.parse(process.env.VCAP_SERVICES);

    console.log(vcap);

    env.mongo = vcap['mongodb2-2.4.8'][0]['credentials'];
}

module.exports = env;


Connect to MongoDB on AppFog