Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vwh/cfw-upload
Simple serverless website built with Cloudflare services to explore their ecosystem—using R2 for storage, D1 for the database, Pages for static hosting, and Workers for serverless functions.
https://github.com/vwh/cfw-upload
cloudflare cloudflare-d1 cloudflare-r2 cloudflare-workers cloudlfare-pages d1 edge r2 serverless workers
Last synced: about 8 hours ago
JSON representation
Simple serverless website built with Cloudflare services to explore their ecosystem—using R2 for storage, D1 for the database, Pages for static hosting, and Workers for serverless functions.
- Host: GitHub
- URL: https://github.com/vwh/cfw-upload
- Owner: vwh
- License: mit
- Created: 2024-09-15T00:26:34.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-08T17:05:34.000Z (4 months ago)
- Last Synced: 2025-01-23T14:32:31.639Z (1 day ago)
- Topics: cloudflare, cloudflare-d1, cloudflare-r2, cloudflare-workers, cloudlfare-pages, d1, edge, r2, serverless, workers
- Language: TypeScript
- Homepage: https://upload.vwh.sh
- Size: 1.31 MB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VWH Upload
Simple serverless website built with Cloudflare services to explore their ecosystem—using R2 for storage, D1 for the database, Pages for static hosting, and Workers for serverless functions.
## Getting Started
### 1. Clone the Repository
```bash
git clone https://github.com/vwh/vwh-upload
cd vwh-upload
```### 2. Install Dependencies
#### Server
```bash
bun install
```#### Client
```bash
cd client
bun install
```### 3. Set Up the Database
1. Create the database:
```bash
bun run db:create
```2. Update the **Database ID** in `wrangler.toml`.
3. Migrate the database:```bash
bun run db:migrate
```(Run migration twice to ensure updates are applied.)
### 4. Set Up the R2 Bucket
```bash
bun run bucket:create
```### 5. Build and Deploy the Static Page
1. Create the page:
```bash
bun run page:create
```2. Build the client code:
```bash
cd client
bun run build
```3. Deploy the page:
```bash
bun run page:deploy
```### 6. Deploy the Worker
```bash
bun run deploy
```