Skip to content

Commit cfdb72f

Browse files
authored
Update app.js
1 parent b6a0cc7 commit cfdb72f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,15 @@ const auth = require('./routes/auth');
1313
//load keys
1414
const keys = require('./config/keys');
1515

16+
//map global promises
17+
mongoose.Promise = global.Promise;
1618

1719
//Mongoose connect
18-
mongoose.connect()
20+
mongoose.connect(keys.mongoURI, {
21+
useMongoClient:true
22+
})
23+
.then(() => console.log('MongoDB Connected'))
24+
.catch(err => console.log(err));
1925

2026

2127
const app = express();

0 commit comments

Comments
 (0)