Skip to content

Instantly share code, notes, and snippets.

@jsr
Created February 4, 2011 18:57
Show Gist options
  • Save jsr/811556 to your computer and use it in GitHub Desktop.
Save jsr/811556 to your computer and use it in GitHub Desktop.
var Db = require('/usr/local/lib/node/mongodb').Db,
Server = require('/usr/local/lib/node/mongodb').Server;
var client = new Db('nodejs_test', new Server("127.0.0.1", 27017, {}));
client.open(function(err,p_client) {
client.createCollection('test_insert', function( err, collection ){
client.collection('test_insert', function(err,collection) {
collection.save({_id:ObjectId('4d4c45209a54301520000001'),d:3}, function(err,docs) {console.log(err)});
})
})
});
process.exit(1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment