var mongoose = require('mongoose');
var config = require('./config.js');
var logger = require('../libs/logger.js');

mongoose.connect(config.get("mongoose:uri"));

mongoose.connection.on('error', function callback() {
	logger.error('Could not connect to %s', config.get("mongoose:uri"));
});

mongoose.connection.once('open', function callback () {
	logger.info('Database is connected to %s', config.get("mongoose:uri"));
});


module.exports = mongoose;
@@ -106,24 +106,110 @@
 gger.js');%0A%0A
+var server_port = process.env.OPENSHIFT_MONGODB_DB_URL %7C%7C config.get(%22mongoose:uri%22)%0A%0A
 mongoose.con

Update Config (bis repetita)