API โ€บ @qwik.dev/qwik-router/middleware/cloudflare-pages

createQwikCity

Warning: This API is now obsolete.

Use createQwikRouter instead. Will be removed in V3

createQwikCity: typeof createQwikRouter;

Edit this section

createQwikRouter

export declare function createQwikRouter(
  opts: QwikRouterCloudflarePagesOptions,
): (
  request: PlatformCloudflarePages["request"],
  env: PlatformCloudflarePages["env"] & {
    ASSETS: {
      fetch: (req: Request) => Response;
    };
  },
  ctx: PlatformCloudflarePages["ctx"],
) => Promise<Response>;

Parameter

Type

Description

opts

QwikRouterCloudflarePagesOptions

(request: PlatformCloudflarePages['request'], env: PlatformCloudflarePages['env'] & { ASSETS: { fetch: (req: Request) => Response; }; }, ctx: PlatformCloudflarePages['ctx']) => Promise<Response>

Edit this section

PlatformCloudflarePages

export interface PlatformCloudflarePages

Property

Modifiers

Type

Description

ctx

{ waitUntil: (promise: Promise<any>) => void; }

env?

Record<string, any>

(Optional)

request

Request

Edit this section

QwikCityCloudflarePagesOptions

Warning: This API is now obsolete.

Use QwikRouterCloudflarePagesOptions instead. Will be removed in V3

export type QwikCityCloudflarePagesOptions = QwikRouterCloudflarePagesOptions;

References: QwikRouterCloudflarePagesOptions

Edit this section

QwikRouterCloudflarePagesOptions

export interface QwikRouterCloudflarePagesOptions extends ServerRenderOptions

Extends: ServerRenderOptions

Edit this section