Constructor
new Server(config, addonsLoader)
Takes a config and an addon loader to build the server.
Parameters:
Name | Type | Description |
---|---|---|
config |
Config | |
addonsLoader |
AddonLoader |
Properties:
Name | Type | Description |
---|---|---|
config |
Config | server config |
addonsLoader |
AddonLoader | addon loader |
hapi |
Object | hapi server instance |
- Source:
Methods
start() → {Promise.<Server>}
Starts the server instance
- Source:
Returns:
- Type
- Promise.<Server>
stop() → {Promise.<Server>}
Stop the server instance
- Source:
Returns:
- Type
- Promise.<Server>
withProfiles(profiles) → {Server}
Add the given profiles to the server instance
Parameters:
Name | Type | Description |
---|---|---|
profiles |
Array.<{}> | profiles to add to the server instance |
- Source:
Returns:
- Type
- Server
withRoutes(routes) → {Server}
Add the given routes to the server instance
Parameters:
Name | Type | Description |
---|---|---|
routes |
Array.<Route> | routes to add to the server instance |
- Source:
Returns:
- Type
- Server