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

@pager/hapi-mongo

Package Overview
Dependencies
Maintainers
13
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

  • 4.0.0
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Maintainers
13
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
});

Keywords

FAQs

Package last updated on 31 Aug 2018

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