Created
February 4, 2011 18:57
-
-
Save jsr/811556 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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