# p2b2-connector-mongodb

> Connector to send data to from the p2b2 data extractor

Latest version **0.0.3** (published 2017-07-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install p2b2-connector-mongodb
pnpm add p2b2-connector-mongodb
yarn add p2b2-connector-mongodb
bun add p2b2-connector-mongodb
```

## 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.0.3 |
| Published | 2017-07-10 |
| First published | 2017-07-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Steffen Härtlein |
| Maintainers | steffen93, nomsi |
| Keywords | blockchain, ethereum, data, extraction |

## Links

- npm: https://www.npmjs.com/package/p2b2-connector-mongodb
- Repository: https://github.com/p2b2/p2b2-connector-mongodb
- Homepage: https://github.com/p2b2/p2b2-connector-mongodb#readme
- Issues: https://github.com/p2b2/p2b2-connector-mongodb/issues
- npm.io page: https://npm.io/package/p2b2-connector-mongodb

## Dependencies (3)

- [mongodb](https://npm.io/package/mongodb.md) ^2.2.28
- [winston](https://npm.io/package/winston.md) ^2.3.1
- [es6-promise](https://npm.io/package/es6-promise.md) ^4.1.0

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2017-07-10
- 0.0.2 — 2017-07-10

## README

# MongoDB Connector

Setup of mongodb database:

Follow the installation instructions from [mongodb](https://docs.mongodb.com/manual/administration/install-community/).

Start the mongodb by executing `sudo service mongod start`

Then, enter the mongodb shell by typing `mongo` in your command line.

Create a database for the project:

```console
use p2b2
```

Create a collection for the blocks to be saved in:

```console
db.createCollection("blocks")
```

**Note**: You won't be able to see the new p2b2 database before creating the collection, because the database is completely empty.

Now that you created the collection, you should be able to see the database using `show dbs` and the collection using `show collections`.

Create an index for the block number:
```console
db.records.createIndex({number:-1})
```

---
_Source: https://npm.io/package/p2b2-connector-mongodb · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
