Constructors
ControllerServerModule()
The constructor initializes the ControllerApiModule
class and creates an instance of the
AbortController
class.
Methods
_configure(): Promise<IServerModuleConfig>
The _configure
function retrieves configuration values from environment variables and assigns
them to properties of an api_config
object, including the host address, port number, TLS
certificate, and TLS key, and returns the api_config
object.
_preflight(): Promise<void>
The _preflight
function sets the server engine base path, registers middleware, and generates an
OpenAPI document.
_startup(): Promise<void>
The _startup
function delays for 100 milliseconds and then calls the #serve
function.
_stop(cause?: string | undefined): Promise<void>
The _stop
function sends an abort signal to the server engine and waits for the server to
complete shutdown.
request(req: Request)
The function request
is an asynchronous function that takes a Request
object as a parameter
and returns the result of calling the request
method on the engine
object.
Constructors
ControllerServerModule()
The constructor initializes the ControllerApiModule
class and creates an instance of the
AbortController
class.
Methods
_configure(): Promise<IServerModuleConfig>
The _configure
function retrieves configuration values from environment variables and assigns
them to properties of an api_config
object, including the host address, port number, TLS
certificate, and TLS key, and returns the api_config
object.
_preflight(): Promise<void>
The _preflight
function sets the server engine base path, registers middleware, and generates an
OpenAPI document.
_startup(): Promise<void>
The _startup
function delays for 100 milliseconds and then calls the #serve
function.
_stop(cause?: string | undefined): Promise<void>
The _stop
function sends an abort signal to the server engine and waits for the server to
complete shutdown.
request(req: Request)
The function request
is an asynchronous function that takes a Request
object as a parameter
and returns the result of calling the request
method on the engine
object.