Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Alternative SvelteKit adaptor for Cloudflare workers. Designed to be standalone and not use wrangler.

License

Notifications You must be signed in to change notification settings

budgetdraw/sveltekit-cloudflare-adapter

Repository files navigation

@budgetdraw/sveltekit-cloudflare-adapter

Alternative SvelteKit adaptor for Cloudflare workers. Designed to be standalone and not use wrangler.

Installation

npm install --save-dev @budgetdraw/sveltekit-cloudflare-adapter

Usage

Add the adapter to your svelte.config.js:

import adapter from '@budgetdraw/sveltekit-cloudflare-adapter'
export default {
	kit: {
		target: '#svelte',
		adapter: adapter()
	}
}

Non-standard Addition

In addition to the normal SvelteKit API, the request object has an additional cfFetchEvent property containing the Cloudflare Worker FetchEvent. This is primarily to allow for waitUntil method in order to perform an action after the response has been sent to the user - for example in order to pass to toucan-js.

About

Alternative SvelteKit adaptor for Cloudflare workers. Designed to be standalone and not use wrangler.

Resources

License

Stars

Watchers

Forks

Packages

No packages published