Module with the server and endpoint configuration and handlers
- Source:
- Tutorials:
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 |
function | function to be called upon 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) stopServer(callback)
Stops the API http server
Parameters:
Name | Type | Description |
---|---|---|
callback |
function | function called after stopping the server |
Type Definitions
timeout()
Returns callback with timeout error
url
Starts the API http server
Type:
- string