@danzlarkin/astro-cloudflare
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

@danzlarkin/astro-cloudflare

A modified fork of @astrojs/cloudflare

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

Install

Add the Cloudflare adapter to enable SSR in your Astro project with the following astro add command. This will install the adapter and make the appropriate changes to your astro.config.mjs file in one step.

# Using NPM
npx astro add cloudflare
# Using Yarn
yarn astro add cloudflare
# Using PNPM
pnpm astro add cloudflare

If you prefer to install the adapter manually instead, complete the following two steps:

  1. Add the Cloudflare adapter to your project's dependencies using your preferred package manager. If you’re using npm or aren’t sure, run this in the terminal:
npm install @danzlarkin/astro-cloudflare
  1. Add the following to your astro.config.mjs file:
// astro.config.mjs
import { defineConfig } from 'astro/config';
import cloudflare from '@danzlarkin/astro-cloudflare';

export default defineConfig({
  output: 'server',
  adapter: cloudflare()
});

Package Sidebar

Install

npm i @danzlarkin/astro-cloudflare

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

47.8 kB

Total Files

34

Last publish

Collaborators

  • danzlarkin