This is a lab project, and it is work in progress. The Astro adapter is on npm at version 0.1.0. Install it, and pin the version you install.
The API, the build output, and the
.bunny/build.jsonmanifest can all change in a minor release. Do not run this in production. Thebunny labCLI commands that deploy it are experimental too.Issues and pull requests are welcome. Tell us what you need.
Edge Scripting runs JavaScript on the bunny.net network, next to your visitors. An adapter in this repository builds your framework's server into one file that Edge Scripting accepts, and serves the build assets from Bunny Storage.
browser ──▶ pull zone ──▶ Edge Script (your framework, server-side)
│
└─ assets and prerendered pages ─▶ Bunny Storage
| Framework | Package | Status | Guide |
|---|---|---|---|
| Astro | @bunny.net/astro-adapter |
Lab, 0.1.0 on npm | Docs |
| SvelteKit | @bunny.net/svelte-adapter |
Planned | — |
| Next.js (OpenNext) | @bunny.net/opennext-adapter |
Planned | — |
Do you want another framework? Open an issue and tell us.
Add the adapter to your own Astro project, and deploy:
npx astro add @bunny.net/astro-adapter # install it, and write the config
bunny lab deploy astro # build, upload the files, publish the script
bunny lab undeploy astro # take it all down againastro add installs the latest release. Pin the version, because a minor
release can change the options and the build output.
The Astro adapter README has the whole story.
examples/astro-showcase is a live Astro site. Every
page demonstrates one adapter capability, and every page is also a test. Read it
to see how a feature works, and copy what you need.
npm install
npm run --workspace examples/astro-showcase dev| Path | Holds |
|---|---|
packages/* |
One adapter each. Astro is on npm, the rest are planned |
examples/* |
Runnable demo sites, which the test suite drives |
tests/ |
The shared end-to-end runner and the Storage emulator |
docs/ |
How to write and release an adapter |
Read CONTRIBUTING.md. It covers the local setup, the three test tiers, and how a change reaches npm.
npm install
npm test # unit tests
npm run test:e2e # build the showcase and run it on Deno, offlineMIT © bunny.net