Creates a new instance of the HttpServer class.
The port number for the server to listen on.
Determines whether to support WebSocket connections.
Private appPrivate basicPrivate cookiePrivate credentialsPrivate indexPrivate isPrivate portThe port number for the server to listen on.
Private serverPrivate serverPrivate supportDetermines whether to support WebSocket connections.
Private websocketStatic Private deleteStatic Private fileStatic Private getStatic Private imageStatic Private postStatic Private putGets the underlying Express application instance.
The Express application instance.
Returns the name property for the auth cookie. This cookie is used for FileProvider/ImageProvider Authentication. Returns null if cookie authentication is disabled.
The the name of the cookie used for authentication or null if cookies are disabled for authentication.
Private getGets the WebsocketServer instance associated with the HTTP server.
The WebsocketServer instance, or null if WebSocket support is not enabled.
Private handlePrivate initializePrivate initializePrivate initializePrivate initializePrivate initializePrivate parsePrivate sendOptional id: stringOptional auth: stringPrivate sendOptional id: stringOptional auth: stringPrivate serverStops the server from accepting new connections and keeps existing connections.
This function is asynchronous, and the server is finally closed when all connections are ended
and the server emits a 'close' event.
A promise that is resolved once all connections are closed.
Static registerRegisters a DELETE method.
The configuration for the DELETE method.
Static registerRegisters a file provider.
The file provider to register.
Static registerRegisters a GET method.
The configuration for the GET method.
Static registerRegisters an image provider.
The image provider to register.
Static registerRegisters a POST method.
The configuration for the POST method.
Static registerRegisters a PUT method.
The configuration for the PUT method.
Generated using TypeDoc
Represents an HTTP server.