A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.npmjs.org/package/hapi-setup below:

hapi-setup - npm

hapi-setup

hapi plugin that exposes a setup method for retrieving the server configuration. Provides information such as the version of Node running, the hapi server connections, routing tables per connection, and plugin information.

Example Usage

The example below registers the hapi-setup plugin. In the handler for the /about route, the hapi-setup.setup() function is executed, which returns an object, and the result is then used to reply to the incoming request.

var server = new Hapi.Server();

server.connection();

 

server.register(require('hapi-setup'), function (err) {

  server.route({

    method: 'GET',

    path: '/about',

    handler: function (request, reply) {

      reply(request.server.plugins['hapi-setup'].setup());

    }

  })

});

 

API setup()

Exposed plugin method used for returning the setup information of the current hapi server.

Returns the following object:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4