var mongoose = require('mongoose');
var env = require('../env.json');

// Making mongoose use the default promise and not a third-party promise
mongoose.Promise = global.Promise;

var DB_USERNAME = process.env.DB_USERNAME || env['DB_USERNAME'];
var DB_PASSWORD = process.env.DB_PASSWORD || env['DB_PASSWORD'];

//console.log(DB_USERNAME);

var uri = `mongodb://${DB_USERNAME}:${DB_PASSWORD}@ds119675.mlab.com:19675/intuition`;
global.db = mongoose.connect(uri, {
    useMongoClient: true
});

global.db.on('error', console.error.bind(console, 'connection error:'));
// mongoose.connect('mongodb://kowshik:kowshik@ds119675.mlab.com:19675/intuition', {
//     useMongoClient: true
// });

module.exports = {mongoose};

@@ -29,16 +29,19 @@
 oose');%0A
+// 
 var env 
@@ -176,16 +176,19 @@
 omise;%0A%0A
+// 
 var DB_U
@@ -244,16 +244,19 @@
 NAME'%5D;%0A
+// 
 var DB_P
@@ -317,87 +317,45 @@
 %5D;%0A%0A
-//console.log(DB_USERNAME);%0A%0Avar uri = %60mongodb://$%7BDB_USERNAME%7D:$%7BDB_PASSWORD%7D
+%0Avar uri = %60mongodb://kowshik:kowshik
 @ds1

fix for deploy