Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodneylab/upstash-astro
Get Started with Astro and Redis Tutorial Starter Code
https://github.com/rodneylab/upstash-astro
astrojs cloudflare-pages cloudflare-pages-functions cloudflare-workers redis svelte upstash
Last synced: 13 days ago
JSON representation
Get Started with Astro and Redis Tutorial Starter Code
- Host: GitHub
- URL: https://github.com/rodneylab/upstash-astro
- Owner: rodneylab
- License: bsd-3-clause
- Created: 2022-08-27T14:22:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-30T18:45:52.000Z (over 2 years ago)
- Last Synced: 2024-11-11T00:34:25.035Z (2 months ago)
- Topics: astrojs, cloudflare-pages, cloudflare-pages-functions, cloudflare-workers, redis, svelte, upstash
- Language: Svelte
- Homepage:
- Size: 353 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Get Started with Astro and Redis Tutorial
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/github/rodneylab/upstash-astro)
This is starter code for the Get Started with Astro and Redis tutorial. In that tutorial we create a basic notes app using Astro in SSR mode. We use Cloudflare Workers to interface with the Upstash serverless database. To get going clone the starter then follow the link to complete the tutorial:
```shell
pnpm create astro -- --template rodneylab/upstash-astro
```## 🚀 Server Side Rendering (SSR)
Project uses Cloudflare Pages with Cloudflare Workers running in advanced mode. Update `astro.config.js` to switch to directory mode. To preview built site run:
```shell
pnpm preview:cloudflare
```## 🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
| :----------------------------- | :----------------------------------------------- |
| `pnpm install` | Installs dependencies |
| `pnpm astro telemetry disable` | Disable data collection |
| `pnpm dev` | Starts local dev server at `localhost:3000` |
| `pnpm build` | Build your production site to `./dist/` |
| `pnpm preview:cloudflare` | Preview your build locally with Wrangler |
| `pnpm astro ...` | Run CLI commands like `astro add`, `astro build` |
| `pnpm astro --help` | Get help using the Astro CLI |Feel free to jump into the [Rodney Lab matrix chat room](https://matrix.to/#/%23rodney:matrix.org).