Server
Abstraction to manage running the server.
Instantiates on application server start up inside entry.js file or wherever the intial "main" script is
Constructor Summary
| Public Constructor | ||
| public |
Server Constructor |
|
Method Summary
| Public Methods | ||
| public |
addEndpoint(endpoint: EndpointConfig): undefined Adds an endpoint at the path given handled by the controller |
|
| public |
addEndpoints(routes: Array<EndpointConfig>): undefined Adds the endpoints given to the server |
|
| public |
Logs a message through hapi-pino |
|
| public |
Starts the server and registers any plugins |
|
| public |
Shutdown the Hapi Server Properly |
|
Public Constructors
Public Methods
public addEndpoint(endpoint: EndpointConfig): undefined source
Adds an endpoint at the path given handled by the controller
Params:
| Name | Type | Attribute | Description |
| endpoint | EndpointConfig | configuration |
public addEndpoints(routes: Array<EndpointConfig>): undefined source
Adds the endpoints given to the server
Params:
| Name | Type | Attribute | Description |
| routes | Array<EndpointConfig> | Routes to add to the server |
