hapi-mongoose-connection

2.0.0 • Public • Published

Hapi Mongoose Connection Plugin

Install

NPM

$ npm install hapi-mongoose-connection --save

Usage

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

Readme

Keywords

none

Package Sidebar

Install

npm i hapi-mongoose-connection

Weekly Downloads

0

Version

2.0.0

License

MIT

Unpacked Size

33 kB

Total Files

5

Last publish

Collaborators

  • mglagola