Skip to content

harsha-bhat/node-stream-to-mongo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Stream objects to a Mongo database

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.7%
  • Makefile 7.3%