mongodb-collection-dump
v0.2.1
Published
Dumps a mongodb collection to a stream.
Downloads
16
Readme
#mongodb-collection-dump
dumps a mongodb collection to a stream.
Specify a mongoDB connect URI, the collection, and a path to the target file.
example
Dump a collection to stream:
var todo = null;
methods
var dump = require('mongodb-collection-dump')
var d = dump(connectURI, collection, stream)
Create a new dump instance d
that connects to the mongodb database at connectURI
and dumps the entire collection to stream
.
events
d.on('end', function () {})
This event fires when no more data will be provided from the database and after the database connection has closed.
d.on('error', function (err) {})
Emitted when there is a error connecting to the database.
install
With npm do:
npm install mongodb-collection-dump
license
MIT