@sveltejs/kit/node
import { function createReadableStream(file: string): ReadableStream
Converts a file on disk to a readable stream
createReadableStream, function getRequest({ request, base, bodySizeLimit }: {
request: import("http").IncomingMessage;
base: string;
bodySizeLimit?: number;
}): Promise<Request>
getRequest, function setResponse(res: import("http").ServerResponse, response: Response): Promise<void>
setResponse } from '@sveltejs/kit/node';
createReadableStream
自 2.4.0 版本可用
将磁盘上的文件转换为可读流
function createReadableStream(file: string): ReadableStream;
getRequest
function getRequest({
request,
base,
bodySizeLimit
}: {
request: import('http').IncomingMessage;
base: string;
bodySizeLimit?: number;
}): Promise<Request>;
setResponse
function setResponse(
res: import('http').ServerResponse,
response: Response
): Promise<void>;