import { Server as HttpServer } from 'node:http'; export default class Server { private transportOptions?; private httpServer?; private startPromise?; private stopPromise?; private sessionStoreCleanup?; /** * Run server */ run(): Promise; /** * Start server and resolve once it accepts connections */ start(): Promise; /** * Perform the startup attempt, releasing acquired resources when it fails */ private startHttpServer; /** * Build the Express application and put its HTTP server on the wire */ private initializeHttpServer; /** * Register the session middleware when the application ships a session config */ private registerSession; /** * Register the global request body parsers * * Each parser consumes the request stream, so an application that needs untouched * request bodies (streamed uploads, request proxying) can switch them off and * register the parsers it needs on individual routes instead. */ private registerBodyParsers; /** * Register every middleware listed in the application middleware kernel */ private registerMiddlewares; /** * Bind the HTTP server to its port, rejecting when the port cannot be acquired */ private listen; /** * Stop accepting connections and release every resource the server owns */ stop(): Promise; /** * Perform the shutdown sequence */ private shutdownHttpServer; /** * Release the session store resources owned by this server */ private cleanupSessionStore; }