1.1.0 • Published 10 years ago

mongo-write-stream v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

mongo-write-stream

build status

Node.js module that creates a writable object stream to a mongodb collection.

npm install mongo-write-stream

Example.

var mongoWriteStream = require('mongo-write-stream');
var collectionWriteStream = mongoWriteStream('mongodb://hostname/mydb');

someObjectReadableStream.pipe(collectionWriteStream('collectionName'));

Instead of a connection string you can also pass a mongodb native driver database instance or a mongojs database instance to avoid duplicate connections.