Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/morinokami/bun-astro-cloudflare
Astro project built with Bun 1.0 and deployed to Cloudflare Pages
https://github.com/morinokami/bun-astro-cloudflare
astro bun cloudflare
Last synced: 25 days ago
JSON representation
Astro project built with Bun 1.0 and deployed to Cloudflare Pages
- Host: GitHub
- URL: https://github.com/morinokami/bun-astro-cloudflare
- Owner: morinokami
- Created: 2023-09-09T02:08:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-09T02:34:50.000Z (about 1 year ago)
- Last Synced: 2024-03-17T21:53:52.700Z (8 months ago)
- Topics: astro, bun, cloudflare
- Language: Astro
- Homepage:
- Size: 311 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bun-astro-cloudflare
https://bun-astro-cloudflare.pages.dev/
This is an [Astro](https://astro.build/) project built with [Bun 1.0](https://bun.sh/blog/bun-v1.0) and deployed to [Cloudflare Pages](https://pages.cloudflare.com/).
## How I created this project
1. Create a new Astro project with `bunx create-astro`:
```sh
$ bunx create-astro╭─────╮ Houston:
│ ◠ ◡ ◠ Let's build something awesome!
╰─────╯astro v3.0.12 Launch sequence initiated.
dir Where should we create your new project?
./bun-astro-cloudflaretmpl How would you like to start your new project?
Use blog template
✔ Template copieddeps Install dependencies?
Yes
✔ Dependencies installedts Do you plan to write TypeScript?
Yesuse How strict should TypeScript be?
Strict
✔ TypeScript customizedgit Initialize a new git repository?
Yes
✔ Git initializednext Liftoff confirmed. Explore your project!
Enter your project directory using cd ./bun-astro-cloudflare
Run bun run dev to start the dev server. CTRL+C to stop.
Add frameworks like react or tailwind using astro add.Stuck? Join us at https://astro.build/chat
╭─────╮ Houston:
│ ◠ ◡ ◠ Good luck out there, astronaut! 🚀
╰─────╯
```
2. Configure build settings and environment variables on Cloudflare Pages:
- Build command: `bun run build`
- Build output directory: `dist`
- Environment variables:
```
SKIP_DEPENDENCY_INSTALL=true
UNSTABLE_PRE_BUILD=asdf plugin add bun && asdf install bun latest && asdf global bun latest && bun install
```## References
- [Hello from Bun!](https://blog.otterlord.dev/posts/hello-from-bun/)