hapi.app.server

0.1.6 • Public • Published

HAPI Application Server

HAPI server to ease the creation and integration of applications that consume the HAPI API.

This is used by HAPI.App to server up HAPI applications.

Installation

DO NOT INSTALL NPM DIRECTLY! THIS IS JUST USED BY HAPI.APP!

Custom MiddleWares for Express.

You can specify custom middlewares to be used in the application server by creating an app.server.config.json file in the folder from where you start the server. The file must contain an array of paths to middleware modules.

e.g.

[
    "tamperMW",
    "./mw/yourMiddleWare"
]

We provide a set of default modules which you can find in src/modules. To use these default modules you just need to specify their name (without the extension) as they appear in the src/modules folder.

By default the application will use the modules specified in the default.app.server.config.json file in the root of this repo.

Be aware that the order in which the modules are specified in the config file is meaningful. The application will load them in sequence.

Custom middlewares need to implement a specific interface which exposes the following method:

configure: ({app: app, callback: callback}) ->

Readme

Keywords

none

Package Sidebar

Install

npm i hapi.app.server

Weekly Downloads

7

Version

0.1.6

License

BSD

Last publish

Collaborators

  • huzutechtools
  • alin-roman-zitec