HotServer
Class: HotServer
The server.
Hierarchy​
HotServer
↳
HotHTTPServer
↳
HotTesterServer
Implements​
IHotServer
Table of contents​
Constructors​
Properties​
Methods​
Constructors​
constructor​
• new HotServer(processor
)
Parameters​
Name | Type |
---|---|
processor | HotStaq | HotServer |
Defined in​
Properties​
api​
• api: HotAPI
The API to use.
Implementation of​
IHotServer.api
Defined in​
listenAddress​
• listenAddress: string
The network address to listen on.
Implementation of​
IHotServer.listenAddress
Defined in​
logger​
• logger: HotLog
The logger.
Implementation of​
IHotServer.logger
Defined in​
ports​
• ports: Object
The ports to use.
Type declaration​
Name | Type |
---|---|
http | number |
https | number |
Implementation of​
IHotServer.ports
Defined in​
processor​
• processor: HotStaq
The processor to use.
Implementation of​
IHotServer.processor
Defined in​
redirectHTTPtoHTTPS​
• redirectHTTPtoHTTPS: boolean
Redirect HTTP traffic to HTTPS.
Implementation of​
IHotServer.redirectHTTPtoHTTPS
Defined in​
secrets​
• secrets: any
Any secrets associated with this server.
Implementation of​
IHotServer.secrets
Defined in​
serverType​
• serverType: string
The server type.
Implementation of​
IHotServer.serverType
Defined in​
ssl​
• ssl: Object
SSL settings.
Type declaration​
Name | Type | Description |
---|---|---|
ca | string | The SSL certificate CA to use. |
cert | string | The SSL certificate to use. |
key | string | The SSL certificate key to use. |
Implementation of​
IHotServer.ssl
Defined in​
type​
• type: HotServerType
The type of server.
Implementation of​
IHotServer.type
Defined in​
Methods​
listen​
â–¸ Optional
listen(): Promise
<void
>
Start listening for requests.
Returns​
Promise
<void
>
Defined in​
registerRoute​
â–¸ Optional
registerRoute(route
): Promise
<void
>
Register a route with the server.
Parameters​
Name | Type |
---|---|
route | HotRoute |
Returns​
Promise
<void
>
Defined in​
setAPI​
â–¸ setAPI(api
): Promise
<void
>
Set an API to this server. This will also set the associated processor to this API as well.
Parameters​
Name | Type |
---|---|
api | HotAPI |
Returns​
Promise
<void
>
Defined in​
shutdown​
â–¸ Optional
shutdown(): Promise
<void
>
Shutdown the server.
Returns​
Promise
<void
>