Back to Qwik

@builder.io/qwik-city/middleware/cloudflare-pages API Reference

packages/docs/src/routes/api/qwik-city-middleware-cloudflare-pages/index.mdx

1.7.12.1 KB
Original Source

API › @builder.io/qwik-city/middleware/cloudflare-pages

<h2 id="createqwikcity">createQwikCity</h2>
typescript
export declare function createQwikCity(opts: QwikCityCloudflarePagesOptions): (
  request: PlatformCloudflarePages["request"],
  env: PlatformCloudflarePages["env"] & {
    ASSETS: {
      fetch: (req: Request) => Response;
    };
  },
  ctx: PlatformCloudflarePages["ctx"],
) => Promise<Response>;
<table><thead><tr><th>

Parameter

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

opts

</td><td>

QwikCityCloudflarePagesOptions

</td><td> </td></tr> </tbody></table>

Returns:

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

Edit this section

<h2 id="platformcloudflarepages">PlatformCloudflarePages</h2>
typescript
export interface PlatformCloudflarePages
<table><thead><tr><th>

Property

</th><th>

Modifiers

</th><th>

Type

</th><th>

Description

</th></tr></thead> <tbody><tr><td>

ctx

</td><td> </td><td>

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

</td><td> </td></tr> <tr><td>

env?

</td><td> </td><td>

Record<string, any>

</td><td>

(Optional)

</td></tr> <tr><td>

request

</td><td> </td><td>

Request

</td><td> </td></tr> </tbody></table>

Edit this section

<h2 id="qwikcitycloudflarepagesoptions">QwikCityCloudflarePagesOptions</h2>
typescript
export interface QwikCityCloudflarePagesOptions extends ServerRenderOptions

Extends: ServerRenderOptions

Edit this section