Skip to content

Instantly share code, notes, and snippets.

View HarryPehkonen's full-sized avatar

Harri Pehkonen HarryPehkonen

View GitHub Profile
var db = new mongo.Db('mydatabase', new mongo.Server("127.0.0.1", 27017, {}));
db.open(function(e, db) {
get('/', function() {
var $this = this
db.collection('some-collection', function(e, col){
col.find({}, {}, function(e, items) {
items.each(function(err, item) {
sys.puts(sys.inspect(item))
})