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

hapi-ding

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hapi-ding

Informational status page for Hapi apps

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-96.81%
Maintainers
4
Weekly downloads
 
Created
Source

Ding Route Plugin for Hapi

npm version Build Status Coverage Status

This Hapi plugin exposes a route at /ding (by default), which responds with useful server information.

This plugin works with Hapi 17 and above.

const Hapi = require('hapi');

const server = Hapi.Server({
  load: {
    sampleInterval: 1000
  },
  host: 'localhost',
  port: 8000
});

await server.register({
  plugin: require('hapi-ding')
});

when you hit /ding, the route will reply with

{
  "ding": {
    "cpu": [
      1.67236328125,
      1.828125,
      1.927734375
    ],
    "mem": 1429590016,
    "time": 1425933629427,
    "heap": 13402416,
    "loop": 4.86166600137949
  }
}

Plugin Options

The following options are available when registering the plugin:

  • 'path' - the path where the route will be registered. Default is /ding.
  • 'objectName' - the name of the object returned. Can be a string or false to put the properties at the root level. Defaults to "ding".
  • 'config' - optional Hapi route options to be merged with the defaults. Defaults to { auth: false }.
  • 'otherData' - static object to be merged with the info object. Defaults to null.

FAQs

Package last updated on 15 Dec 2017

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