Stream objects straight into a MongoDB database.
npm install stream-to-mongo
Seeding a database from large HTTP response or JSON file.
var request = require('request')
var parser = require('JSONStream').parse('rows.*.doc')
var options = { db: 'mongodb://localhost:27017/test-stream', collection: 'docs' }
var streamToMongo = require('stream-to-mongo')(options);
request('http://isaacs.couchone.com/registry/_all_docs')
.pipe(parser)
.pipe(streamToMongo);
Needs a MongoDB instance running.
make test
MIT