# raincatcher-mongoose-store

> Direct mongoose storage

Latest version **0.1.0-pre.1** (published 2017-04-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install raincatcher-mongoose-store
pnpm add raincatcher-mongoose-store
yarn add raincatcher-mongoose-store
bun add raincatcher-mongoose-store
```

## Health

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

Positive: no vulnerabilities.

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

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0-pre.1 |
| Published | 2017-04-10 |
| First published | 2017-04-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+18 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | wtrocki |
| Keywords | wfm, storage, mongo, raincatcher |

## Links

- npm: https://www.npmjs.com/package/raincatcher-mongoose-store
- Repository: https://github.com/feedhenry-raincatcher/raincatcher-mongoose-store
- Homepage: https://github.com/feedhenry-raincatcher/raincatcher-mongoose-store#readme
- Issues: https://github.com/feedhenry-raincatcher/raincatcher-mongoose-store/issues
- npm.io page: https://npm.io/package/raincatcher-mongoose-store

## Dependencies (6)

- [lodash](https://npm.io/package/lodash.md) 4.17.4
- [shortid](https://npm.io/package/shortid.md) 2.2.8
- [bluebird](https://npm.io/package/bluebird.md) 3.5.0
- [mongoose](https://npm.io/package/mongoose.md) 4.9.1
- [fh-wfm-mediator](https://npm.io/package/fh-wfm-mediator.md) 0.3.1
- [fh-mongoose-connector](https://npm.io/package/fh-mongoose-connector.md) git+https://github.com/col1985/fh-mongoose-connector.git

## 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

- 0.1.0-pre.1 (latest) — 2017-04-10
- 0.1.0-pre.2 (development) — 2017-04-11

## README

mongo-connector
===============

One stop shop for all Mongoose schemas 

### Run tests

Ensure Mongo is running on your machine, type the following command

```bash
npm test
```

### Models

Mongoose models can be found in `models` directory. To add a new model use the same naming convention for desired dataset. ie. `workorders` model for `workorders` dataset / collection. Then require the directory and access the model using the name applied.

### API

#### connect

To connect to mongo

```javascript
Connector.connect('mongodb://mongoUriGoseHere:27017/db', {})
  .then(function(db) {
    // has connection object
  }, function(error) {
    // handle error
  });
```

#### getDAL

Get the Data access layer object for a collection/dataset.

```javascript
Connector.getDAL(collectionName, Model).
  then(function(_dal) {
    // do stuff with collection dal
  }, function(error) {
    // handle error
  });
```

#### disconnect

```javascript
Connector.disconnect()
  .then(function() {
    // disconnected
  }, function(error) {
    // something went wrong
  });
```

### Contributing

If updating or adding addtions to the module, please ensure tests are passing before submiting.

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