Constructor
new WebhookServer(opt) → {WebhookServer}
Creates a HTTP Webhook server.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opt |
Object | Options for the server. Properties
|
- Source:
Returns:
- The created server.
- Type
- WebhookServer
Methods
(async) close()
Stops listening for new connections.
Parameters:
Type | Description |
---|---|
Promise | Resolves when server has stopped listening. |
- Source:
(async) listen(port)
Starts listening for the connections.
Parameters:
Name | Type | Description |
---|---|---|
port |
Number | Port to listen to. |
|
Promise | Resolves when server is listening. |
- Source:
Type Definitions
job(req, res)
Callback funtion that gets called when Webhook server recieves data that is valid.
Parameters:
Name | Type | Description |
---|---|---|
req |
IncomingMessage | |
res |
ServerResponse |
- Source: