1.1.0 • Published 10 years ago
mongo-write-stream v1.1.0
mongo-write-stream
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.