hapi-mongoose-connect
v1.0.3
Published
Mongoose connection for Hapi.js
Downloads
93
Maintainers
Readme
hapi-mongoose-connect
Mongoose connection for hapi.js
Install
$ npm install hapi-mongoose-connect
Usage
var Hapi = require('hapi');
var server = new Hapi.Server();
server.connection({ port: 8000 });
server.register({
register: require('hapi-mongoose-connect'),
options: {
mongooseUri: 'mongodb://localhost/my-database',
mongooseOptions: {} // http://mongoosejs.com/docs/connections.html
}
}, function (err) {
if (err) {
throw err;
}
server.start(function (err) {
if (err) {
throw err;
}
console.log('Server started at: ' + server.info.uri);
});
}
});
Tests
Run comand make test
or npm test
. Include 100% test coverage.
License
MIT