Skip to content

Instantly share code, notes, and snippets.

@juanpaco
Created January 14, 2014 21:46
Show Gist options
  • Save juanpaco/8426435 to your computer and use it in GitHub Desktop.
Save juanpaco/8426435 to your computer and use it in GitHub Desktop.
var databaseUrl = "mydb2"; // "username:password@example.com/mydb"
var collections = ["server", "followers"];
var db = require("mongojs").connect(databaseUrl, collections);
db.server.find({
id: 1
}, function(err,res) {
console.log(err)
console.log(res)
db.close()
})
var databaseUrl = "mydb2"; // "username:password@example.com/mydb"
var collections = ["server", "followers"];
var db = require("mongojs").connect(databaseUrl, collections);
db.server.find({
id: 1
}, function(err,res) {
console.log(err)
console.log(res)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment