0.1.4 • Published 4 years ago

@sprdv/hapi-inout v0.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

hapi-inout

npm version npm downloads npm dependencies JavaScript Style Guide

Hapi plugin to log in-coming and out-going requests to console. This module is especially useful during development.

inout demo

Installation

Hapi-inout can be installed using npm or yarn.

npm install @sprdv/hapi-inout

Usage

This plugin can be registered like any other:

'use strict';

const Hapi = require('@hapi/hapi');

const init = async () => {

    const server = Hapi.server();

    await server.register({ 
        plugin: require('@sprdv/hapi-inout'), 
        options: {
            disable: process.env.NODE_ENV === 'production'
        } 
    });

    await server.start();
    console.log('Server running on %s', server.info.uri);
};

init();

Options

The following options are available:

  • disable: disable the plugin (defaults to false).
0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.1

4 years ago

0.0.2

4 years ago