Answers for "mongoose reset database"

0

mongoose reset database

var con = mongoose.connect('mongodb://localhost/mydatabase');
mongoose.connection.on('open', function(){
    con.connection.db.dropDatabase(function(err, result){
		// do somtething here
    });
})
Posted by: Guest on May-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language