Skip to content

Instantly share code, notes, and snippets.

@pphetra
Created May 6, 2012 15:54
Show Gist options
  • Save pphetra/2623060 to your computer and use it in GitHub Desktop.
Save pphetra/2623060 to your computer and use it in GitHub Desktop.
db.open(createCollection)
function createCollection(err, client) {
client.createCollection('docs', insertData)
}
function insertData(err, col) {
for (var i = 0; i < 100; i++) {
col.insert({c: i}, function() {})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment