# botkit-storage-mongoose

> A MongoDB/Mongoose storage driver for Botkit

Latest version **1.0.3** (published 2017-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install botkit-storage-mongoose
pnpm add botkit-storage-mongoose
yarn add botkit-storage-mongoose
bun add botkit-storage-mongoose
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2017-10-26 |
| First published | 2017-08-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+7 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Maintainers | tejzpr |
| Keywords | botkit, mongodb, slack, mongoose |

## Links

- npm: https://www.npmjs.com/package/botkit-storage-mongoose
- Repository: https://github.com/tejzpr/botkit-storage-mongoose
- Homepage: https://github.com/tejzpr/botkit-storage-mongoose#readme
- Issues: https://github.com/tejzpr/botkit-storage-mongoose/issues
- npm.io page: https://npm.io/package/botkit-storage-mongoose

## Dependencies (1)

- [mongoose](https://npm.io/package/mongoose.md) ^4.11.4

## 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
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.3 (latest) — 2017-10-26
- 1.0.2 — 2017-08-16

## README

# botkit-storage-mongoose

A MongoDB/Mongoose storage module for Botkit. 

## Usage

Just require `botkit-storage-mongoose` and pass it a config with a `mongoUri` option.
Then pass the returned storage when creating your Botkit controller. Botkit will do the rest.

Make sure everything you store has an `id` property, that's what you'll use to look it up later.

```
var Botkit = require('botkit'),
    mongodbStorage = require('botkit-storage-mongoose')({mongoUri: '...', tables: ['TABLE1', 'TABLE2']}),
    controller = Botkit.slackbot({
        storage: mongodbStorage // or db: MongoDB-instance
    });
```

```
// then you can use the Botkit storage api, make sure you have an id property
var beans = {id: 'cool', beans: ['pinto', 'garbanzo']};
controller.storage.teams.save(beans);
beans = controller.storage.teams.get('cool');

```

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