Skip to main content
The Deno 2 Release Candidate is here
Learn more
class HttpServer
import { HttpServer } from "https://deno.land/x/sptaki@1.2.0/servers/HttpServer.d.ts";

Constructors

new
HttpServer(
logger: ILogger,
databaseServer: DatabaseServer,
httpServerHelper: HttpServerHelper,
localisationService: LocalisationService,
httpListeners: IHttpListener[],
configServer: ConfigServer,
applicationContext: ApplicationContext,
webSocketServer: WebSocketServer,
)

Properties

protected
applicationContext: ApplicationContext
protected
configServer: ConfigServer
protected
databaseServer: DatabaseServer
protected
httpConfig: IHttpConfig
protected
httpListeners: IHttpListener[]
protected
httpServerHelper: HttpServerHelper
protected
localisationService: LocalisationService
protected
logger: ILogger
protected
started: boolean
protected
webSocketServer: WebSocketServer

Methods

protected
getCookies(req: IncomingMessage): Record<string, string>
protected
handleRequest(req: IncomingMessage, resp: ServerResponse): void
protected
isLocalRequest(remoteAddress: string): boolean

Check against hardcoded values that determine its from a local address

isStarted(): boolean
load(): void

Handle server loading event