5.0.1 • Published 3 years ago

@aptoma/hapi-mongoose-helper v5.0.1

Weekly downloads
20
License
MIT
Repository
github
Last release
3 years ago

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);
	});
5.0.1

3 years ago

5.0.0

3 years ago

4.0.0

5 years ago

3.1.0

6 years ago

3.0.0

6 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.0

8 years ago