hapi-mongoose-connection
v2.0.0
Published
Hapi mongoose connect middleware
Downloads
2
Readme
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