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

hapi-peel

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-peel

Peel is a simple library to help with testing and development of modular plugin based [Hapi](http://hapijs.org) servers. It simply checks if your module is being required (by checking `module.parent`). If your module is not being required, it will create

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

Peel travis npm

Peel is a simple library to help with testing and development of modular plugin based Hapi servers. It simply checks if your module is being required (by checking module.parent). If your module is not being required, it will create a Hapi server, register your plugin module, and pass back the server object for you to start the server with.

Peel fully expects you follow the Hapi plugin interface conventions. This allows you to use your plugin module as a true plugin or directly with Peel.

Install

npm install hapi-peel

API

The only special behavior that exists if if you choose not to pass in a callback to Peel.create, which will auto start the Hapi server. Otherwise you have full control over when the server starts.

var Peel = require('hapi-peel');

// Hapi plugin config
// exports.register = function () {}

Peel.create(module, {
  port: 8080
});

Peel.create(module, config, [callback])

Creates Hapi server if not required, otherwise calls back with no server.

module is required, as well as config.

config approximates Hapi's server arguments host, port, options:

  • host - optional
  • port - optional
  • config - optional

License

MIT

Keywords

FAQs

Package last updated on 11 Dec 2014

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