Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
    });
})
 
PREVIOUS NEXT
Tagged: #mongoose #reset #database
ADD COMMENT
Topic
Name
1+5 =