mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-06 19:00:13 +00:00
11 lines
753 B
TypeScript
11 lines
753 B
TypeScript
import type { IncomingMessage, ServerResponse } from "node:http";
|
|
export type StaticFileServer = (request: IncomingMessage, response: ServerResponse) => void;
|
|
/** Terminal `404` handler for requests no file matched, mirroring the response `finalhandler` used to produce. */
|
|
export declare function sendNotFound(request: IncomingMessage, response: ServerResponse): void;
|
|
/**
|
|
* Serves `dir` on top of a plain `node:http` server, preferring the precompressed `.br`/`.gz` variant of a file when the client accepts it.
|
|
*
|
|
* Requests that match no file are answered by {@link sendNotFound}.
|
|
*/
|
|
export declare function createStaticFileServer(dir: string, logError: (message: string) => void): StaticFileServer;
|
|
//# sourceMappingURL=staticFileServer.d.ts.map
|