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 d = ;{console;}d;
methods
var dump =
var d = dump(connectURI, collection)
dump connects to the mongodb database at connectURI
and begins streaming the entire collection
.
The returned object d
is an instance of through.
events
through events)
d.on(Any event through normally emits.
d.on('connectError', function (err) {})
Emitted when there is a error connecting to the database.
install
With npm do:
npm install mongodb-collection-dump
license
MIT