• Method for serving the static file at filePath to a client, streamed; if there's none, the file at defaultPath with defaultCode, else a 404.

    Parameters

    • _: IncomingMessage
    • res: ServerResponse
    • filePath: string
    • Optional defaultPath: string
    • Optional defaultCode: number
    • headers: ((filePath: string) => OutgoingHttpHeaders) = ...
        • (filePath: string): OutgoingHttpHeaders
        • Headers to add to a file's reply (caching, say), given its path under fileRoot

          Parameters

          • filePath: string

          Returns OutgoingHttpHeaders

    Returns Promise<void>

Generated using TypeDoc