Module with the server and endpoint configuration and handlers
- Source:
- Tutorials:
Members
(inner, constant) wfApiEndpoints :Array
Type:
- Array
Methods
(inner) createEndpoints(endpointCb, callback)
Creates routes to the API endpoints
Parameters:
| Name | Type | Description |
|---|---|---|
endpointCb |
logEndpointEventCb | function passed to the endpoint handler to be invoked when done |
callback |
errorCb | function called on completion |
(inner) monitorSocket(callback)
Monitors socket client connections
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
logEndpointEventCb |
(inner) sendSocket(data)
Sends out data on socket
Parameters:
| Name | Type | Description |
|---|---|---|
data |
string |
(inner) startServer(callback)
Starts the API http server
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
genericCb | function called after starting the server |
(inner) stopServer(callback)
Stops the API http server
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
errorCb | function called after stopping the server |
Type Definitions
timeoutCb()
Returns callback with timeout error