Skip to content

Instantly share code, notes, and snippets.

@renatoargh
Last active December 14, 2015 03:08
Show Gist options
  • Select an option

  • Save renatoargh/5018263 to your computer and use it in GitHub Desktop.

Select an option

Save renatoargh/5018263 to your computer and use it in GitHub Desktop.
var mongoose = require("mongoose");
mongoose.connect("mongodb://localhost/basededados?w=1");
mongoose.connection.db.executeDbCommand({ ping: 1 }, {}, function(err, result){
if(err) console.log(err);
else console.log(result);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment