# adamvr-stream-to-mongo

> Write a stream of objects to a Mongo database

Latest version **0.1.8** (published 2016-05-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install adamvr-stream-to-mongo
pnpm add adamvr-stream-to-mongo
yarn add adamvr-stream-to-mongo
bun add adamvr-stream-to-mongo
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.8 |
| Published | 2016-05-02 |
| First published | 2016-05-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 47 |
| Author | Stanislas Marion |
| Maintainers | adamvr |
| Keywords | mongo, write, stream |

## Links

- npm: https://www.npmjs.com/package/adamvr-stream-to-mongo
- Repository: https://github.com/czzarr/node-stream-to-mongo
- Homepage: https://github.com/czzarr/node-stream-to-mongo#readme
- Issues: https://github.com/czzarr/node-stream-to-mongo/issues
- npm.io page: https://npm.io/package/adamvr-stream-to-mongo

## Dependencies (1)

- [mongodb](https://npm.io/package/mongodb.md) 2

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [@temporal-architect/claude-plugin](https://npm.io/package/@temporal-architect/claude-plugin.md) — 335 weekly downloads

## Recent versions

- 0.1.8 (latest) — 2016-05-02
- 0.1.7 — 2016-05-02
- 0.1.6 — 2016-05-02
- 0.1.5 — 2016-05-02

## README

# StreamToMongo
Stream objects straight into a MongoDB database.

[![Build
Status](https://travis-ci.org/czzarr/node-stream-to-mongo.png)](https://travis-ci.org/czzarr/node-stream-to-mongo)

## Install
`npm install stream-to-mongo`

## Main usecase 
Seeding a database from large HTTP response or JSON file.

## Example
```javascript
var request = require('request')
var parser = require('JSONStream').parse('rows.*.doc')
var options = { db: 'mongodb://localhost:27017/test-stream', collection: 'docs' }
var streamToMongo = require('stream-to-mongo')(options);

request('http://isaacs.couchone.com/registry/_all_docs')
  .pipe(parser)
  .pipe(streamToMongo);
```
## Test
Needs a MongoDB instance running.
`make test`

## License

MIT

---
_Source: https://npm.io/package/adamvr-stream-to-mongo · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
