0.1.5 • Published 9 years ago

stream-to-mongo v0.1.5

Weekly downloads
146
License
MIT
Repository
github
Last release
9 years ago

StreamToMongo

Stream objects straight into a MongoDB database.

Build
Status

Install

npm install stream-to-mongo

Main usecase

Seeding a database from large HTTP response or JSON file.

Example

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);

Test

Needs a MongoDB instance running. make test

License

MIT

0.1.5

9 years ago

0.1.4

10 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago