0.1.17 • Published 4 years ago

bodega-js v0.1.17

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

Bodega-Js

Abstracts all the code involved in writing a Hapi server from scratch. All you have to do is include the bodega-js module, instantiate the HttpServer with a simple confiuration object, then start!

Requirements

  • node >=12

Installation

npm i --save bodega-js

Usage

const HttpServer = require('bodega-js').Server;

const httpServer = new HttpServer({
    port: 8080 // Whichever port you want the server to run on
    routes: [/* hapi v18 routes */],
    logger, // used for error reporting and status updates outside of request logging
    swagger: {  // optional
        title: 'A title for your documentation'
        pathPrefix: 'A prefix for your documentation routes (e.g. /v1)',
        disabled: false, // optional, default false
        includeAuth: true // optional, default true.  displays a field in the header for entering your jwt token
    }
});

await httpServer.start();
await waitForDone();
await httpServer.stop();

Copyright

Copyright © 2019 AJ LaBarre, all rights reserved.

0.1.15

4 years ago

0.1.16

4 years ago

0.1.17

4 years ago

0.1.14

4 years ago

0.1.13

4 years ago

0.1.12

4 years ago

0.1.11

4 years ago

0.1.10

4 years ago

0.1.9

4 years ago

0.1.8

4 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

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