A simple Hapi MongoDB connection plugin.
This is a plugin to share a common MongoDB connection pool across the whole Hapi server.
Options can be a single object with the following keys or an array of the same kind if you need multiple connections :
Several objects are exposed by this plugin :
db: connection object to the database, if an array was provided for the configuration, it will be an array of connections in the same order
lib: mongodb library in case you need to use it
ObjectID: mongodb ObjectID constructor in case you need to use it
Usage example :
const Hapi = ;const Boom = ;const dbOpts =url: 'mongodb://localhost:27017/test'settings:poolSize: 10decorate: true;const server = ;server;