What do you want to save?
Add Code snippet
New code examples
-
Other 2022-02-02 20:30:58
add mongodb compass to js
var mongoUrl = '"mongodb://tfi-mfgbt.mongodb.net/test"' var mongoose = require('mongoose') mongoose.connect(mongoUrl, { useMongoClient: true }) mongoose.connection.on('error', err => debug('MongoDB connection error: ${err}')); Add solution -
Javascript 2021-10-30 03:37:12
connecting to mongoDB using mongoose
//Import the mongoose module var mongoose = require('mongoose'); //Set up default mongoose connection var mongoDB = 'mongodb://127.0.0.1/my_database'; mongoose.connect(mongoDB, {useNewUrlParser: true, useUnifiedTopology: true}); //Get the default connec... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5