Constructor
new Server()
Methods
port() → {number}
Gets the port that the server is listening on. The server must be started before this method is called.
Returns:
The port number
- Type
- number
start(options) → {Promise.<undefined>}
Starts the server.
Parameters:
Name | Type | Description |
---|---|---|
options |
ServerStartOptions |
Returns:
A promise that resolves upon successful start.
- Type
- Promise.<undefined>
stop() → {Promise.<undefined>}
Stops the server.
Returns:
- Type
- Promise.<undefined>