# hapi-mongoose-connection

> Hapi mongoose connect middleware

Latest version **2.0.0** (published 2018-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install hapi-mongoose-connection
pnpm add hapi-mongoose-connection
yarn add hapi-mongoose-connection
bun add hapi-mongoose-connection
```

## 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 | 2.0.0 |
| Published | 2018-05-12 |
| First published | 2017-03-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=7.0 |
| Dependencies | 0 |
| Unpacked size | 32.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mark Glagola |
| Maintainers | mglagola |

## Links

- npm: https://www.npmjs.com/package/hapi-mongoose-connection
- npm.io page: https://npm.io/package/hapi-mongoose-connection

## Recent versions

- 2.0.0 (latest) — 2018-05-12
- 1.0.1 — 2017-03-19
- 0.0.1 — 2017-03-19

## README

# Hapi Mongoose Connection Plugin

## Install

**NPM**
```bash
$ npm install hapi-mongoose-connection --save
```

## Usage

```js
const HapiMongoose = require('hapi-mongoose-connection');
const Promise = require('bluebird');

const mongodbURI = process.env.MONGODB_URI;

const MongooseSetup = {
    register: HapiMongoose,
    options: {
        uri: mongodbURI,
        promise: Promise,
        ...any_mongoose_connection_options_here
    },
};

...

server.register([
    ...
    MongooseSetup,
    ...
], (err) => {
    if (err) throw err;
    ...
});


```

## License

MIT

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