Skip to main content

HotServer

hotstaq / Modules / HotServer

Class: HotServer

The server.

Hierarchy​

Implements​

  • IHotServer

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new HotServer(processor)

Parameters​

NameType
processorHotStaq | HotServer

Defined in​

HotServer.ts:140

Properties​

api​

• api: HotAPI

The API to use.

Implementation of​

IHotServer.api

Defined in​

HotServer.ts:94


listenAddress​

• listenAddress: string

The network address to listen on.

Implementation of​

IHotServer.listenAddress

Defined in​

HotServer.ts:98


logger​

• logger: HotLog

The logger.

Implementation of​

IHotServer.logger

Defined in​

HotServer.ts:134


ports​

• ports: Object

The ports to use.

Type declaration​

NameType
httpnumber
httpsnumber

Implementation of​

IHotServer.ports

Defined in​

HotServer.ts:102


processor​

• processor: HotStaq

The processor to use.

Implementation of​

IHotServer.processor

Defined in​

HotServer.ts:86


redirectHTTPtoHTTPS​

• redirectHTTPtoHTTPS: boolean

Redirect HTTP traffic to HTTPS.

Implementation of​

IHotServer.redirectHTTPtoHTTPS

Defined in​

HotServer.ts:126


secrets​

• secrets: any

Any secrets associated with this server.

Implementation of​

IHotServer.secrets

Defined in​

HotServer.ts:138


serverType​

• serverType: string

The server type.

Implementation of​

IHotServer.serverType

Defined in​

HotServer.ts:90


ssl​

• ssl: Object

SSL settings.

Type declaration​

NameTypeDescription
castringThe SSL certificate CA to use.
certstringThe SSL certificate to use.
keystringThe SSL certificate key to use.

Implementation of​

IHotServer.ssl

Defined in​

HotServer.ts:109


type​

• type: HotServerType

The type of server.

Implementation of​

IHotServer.type

Defined in​

HotServer.ts:130

Methods​

listen​

â–¸ Optional listen(): Promise<void>

Start listening for requests.

Returns​

Promise<void>

Defined in​

HotServer.ts:205


registerRoute​

â–¸ Optional registerRoute(route): Promise<void>

Register a route with the server.

Parameters​

NameType
routeHotRoute

Returns​

Promise<void>

Defined in​

HotServer.ts:200


setAPI​

â–¸ setAPI(api): Promise<void>

Set an API to this server. This will also set the associated processor to this API as well.

Parameters​

NameType
apiHotAPI

Returns​

Promise<void>

Defined in​

HotServer.ts:188


shutdown​

â–¸ Optional shutdown(): Promise<void>

Shutdown the server.

Returns​

Promise<void>

Defined in​

HotServer.ts:210