Created
September 10, 2019 03:39
-
-
Save artemis15/67e3ba84a2f7f7e354dfd68783a9d84c to your computer and use it in GitHub Desktop.
Server js code to connect DB without warnings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/mongoose_basics', {useNewUrlParser: true, useUnifiedTopology: true} , function (err) { | |
if (err) throw err; | |
console.log('Successfully connected'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment