Minimal HTTP + WebSocket server used to serve test bundles and push reload events.
serve(config?: { port: number; onListen?: (s: object) => void; onError?: (e: Error) => void; },handler: (req: http.IncomingMessage,res: http.ServerResponse) => void): Promise<http.Server>
Creates and starts a plain http.createServer instance on the given port.
close(): Promise<void>
Closes the underlying HTTP server and all active connections, returning a Promise that resolves once the server is fully closed.
delete(path: string,handler: RouteHandler): void
Registers a DELETE route handler.
get(path: string,handler: RouteHandler): void
Registers a GET route handler.
listen(port?: number,callback?: () => void): Promise<void>
Starts listening on the given port (0 = OS-assigned).
post(path: string,handler: RouteHandler): void
Registers a POST route handler.
publish(data: string): void
Broadcasts a message to all connected WebSocket clients.
put(path: string,handler: RouteHandler): void
Registers a PUT route handler.
use(middleware: Middleware): void
Adds a middleware function to the chain.