Skip to content

Instantly share code, notes, and snippets.

@artemis15
Created September 10, 2019 03:39
Show Gist options
  • Save artemis15/67e3ba84a2f7f7e354dfd68783a9d84c to your computer and use it in GitHub Desktop.
Save artemis15/67e3ba84a2f7f7e354dfd68783a9d84c to your computer and use it in GitHub Desktop.
Server js code to connect DB without warnings
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