API โบ @builder.io/qwik-city/middleware/node
createQwikCity
export declare function createQwikCity(opts: QwikCityNodeRequestOptions): {
  router: (
    req: IncomingMessage | Http2ServerRequest,
    res: ServerResponse,
    next: NodeRequestNextFunction,
  ) => Promise<void>;
  notFound: (
    req: IncomingMessage | Http2ServerRequest,
    res: ServerResponse,
    next: (e: any) => void,
  ) => Promise<void>;
  staticFile: (
    req: IncomingMessage | Http2ServerRequest,
    res: ServerResponse,
    next: (e?: any) => void,
  ) => Promise<void>;
};| Parameter | Type | Description | 
|---|---|---|
| opts | 
Returns:
{ router: (req: IncomingMessage | Http2ServerRequest, res: ServerResponse, next: NodeRequestNextFunction) => Promise<void>; notFound: (req: IncomingMessage | Http2ServerRequest, res: ServerResponse, next: (e: any) => void) => Promise<void>; staticFile: (req: IncomingMessage | Http2ServerRequest, res: ServerResponse, next: (e?: any) => void) => Promise<void>; }
NodeRequestNextFunction
export interface NodeRequestNextFunctionPlatformNode
export interface PlatformNode| Property | Modifiers | Type | Description | 
|---|---|---|---|
| IncomingMessage | Http2ServerRequest | (Optional) | ||
| string | (Optional) | ||
| true | (Optional) | 
QwikCityNodeRequestOptions
export interface QwikCityNodeRequestOptions extends ServerRenderOptionsExtends: ServerRenderOptions
| Property | Modifiers | Type | Description | 
|---|---|---|---|
| (req: IncomingMessage | Http2ServerRequest) => ClientConn | (Optional) Provide a function that returns a  | ||
| (req: IncomingMessage | Http2ServerRequest) => string | null | (Optional) Provide a function that computes the origin of the server, used to resolve relative URLs and validate the request origin against CSRF attacks. When not specified, it defaults to the  If  | ||
| string | (Optional) | ||
| { root?: string; cacheControl?: string; } | (Optional) Options for serving static files | 
