astro/packages/integrations/cloudflare
github-actions[bot] 81104a9335
[ci] release (#3604)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-06-16 12:05:10 -04:00
..
src feat: add SSR adaptor for cloudflare pages functions (#3600) 2022-06-16 10:12:25 -04:00
CHANGELOG.md [ci] release (#3604) 2022-06-16 12:05:10 -04:00
package.json [ci] release (#3604) 2022-06-16 12:05:10 -04:00
README.md feat: add SSR adaptor for cloudflare pages functions (#3600) 2022-06-16 10:12:25 -04:00
tsconfig.json feat: add SSR adaptor for cloudflare pages functions (#3600) 2022-06-16 10:12:25 -04:00

@astrojs/cloudflare

An SSR adapter for use with Cloudflare Pages Functions targets. Write your code in Astro/Node and deploy to Cloudflare Pages.

In your astro.config.mjs use:

import { defineConfig } from 'astro/config';
import cloudflare from '@astrojs/cloudflare';

export default defineConfig({
  adapter: cloudflare()
});

Enabling Preview

In order for preview to work you must install wrangler

$ pnpm install wrangler --save-dev

It's then possible to update the preview script in your package.json to "preview": "wrangler pages dev ./dist"