Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pager/hapi-mongo

Package Overview
Dependencies
Maintainers
6
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pager/hapi-mongo

A hapi MongoDB plugin

  • 6.1.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
6
Weekly downloads
 
Created
Source

Hapi-mongo

A hapi Mongoose plugin

Build Status

This plugin provides a MongoDB connection for your Hapi.js server. The configuration settings take the following options:

  • url - (required) database connection uri, following MongoDB's specs.
  • settings - (optional) database connection options, as described here.
const plugin = {
    register: require('@pager/hapi-mongo'),
    options: { url: 'mongodb://localhost/test' }
};

server.register(plugin, (err) => {

    if (err) {
        throw err;
    }

    // Mongoose connection is now available to your handlers

    const db = server.app.mongo;  // 'db' is now a Mongoose#connection instance
});

Versions

  • Use v5.x.x in consumers using Hapi 16.
  • Use v6.x.x in consumers using Hapi 18+.

Notes

If you need to commit a change for consumers using Hapi 16, commit the change as a minor/patch to v5.x.x. If the change also makes sense for Hapi 18+, commit the change to v6.x.x as well.

Keywords

FAQs

Package last updated on 16 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc