RestTestServer
This component is responsible for configuring and controlling the test-rest server.
Constructor Summary
| Public Constructor | ||
| public |
constructor(serverConfig: ServerConfig, hapiConfig: Object) Creates a new instance of RestTestServer. |
|
Member Summary
| Public Members | ||
| public get |
Returns all the endpoints configured for the server. |
|
| public get |
Returns all endpoint and nested endpoints generated routes as an array. |
|
Method Summary
| Public Methods | ||
| public |
Restarts the server. |
|
| public |
Starts the server. |
|
| public |
Stops the server. |
|
Public Constructors
public constructor(serverConfig: ServerConfig, hapiConfig: Object) source
Creates a new instance of RestTestServer.
Params:
| Name | Type | Attribute | Description |
| serverConfig | ServerConfig | The server configuration object. |
|
| hapiConfig | Object |
|
Optional configuration for the underlying Hapi-server. See http://hapijs.com/api#new-serveroptions for more information. |
Public Members
Public Methods
public restart(callback: Function) source
Restarts the server.
Params:
| Name | Type | Attribute | Description |
| callback | Function |
|
An optional callback that will be executed after a successful restart. |