Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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
```