mongoose reset database code example
Example: 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
});
})