@aptoma/hapi-mongoose-helper

Utility functions for using mongoose with hapi.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
00Jul 2, 2019Sep 27, 2016Minified + gzip package size for @aptoma/hapi-mongoose-helper in KB

Readme

Hapi Mongoose Helper

Utility functions for using mongoose with hapi.

Installation

This module is installed via npm:

$ npm install @aptoma/hapi-mongoose-helper

Example

const mongooseHelper = require('@aptoma/hapi-mongoose-helper');
const mongoose = require('mongoose');
const server = new Hapi.Server();
server.connection();

mongooseHelper
    .connect(mongoose, server, config.database)
    .then(() => server.start())
    .then(() => {
        server.log('info', pkgInfo.name + ' v' + pkgInfo.version + ' started at: ' + server.info.uri);
    })
    .catch((err) => {
        console.error('Error starting server', err);
        process.exit(1);
    });

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.