mongo-write-stream

1.1.0 • Public • Published

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.

Package Sidebar

Install

npm i mongo-write-stream

Weekly Downloads

3

Version

1.1.0

License

MIT

Last publish

Collaborators

  • sorribas