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

https://github.com/aayush0325/movies-backend

Winning project for Mercer | Mettl StackHack 2.0
https://github.com/aayush0325/movies-backend

cloudflare-d1 cloudflare-d1-with-drizzle-orm cloudflare-workers drizzle-orm hono honojs nodejs typescript zod

Last synced: about 2 months ago
JSON representation

Winning project for Mercer | Mettl StackHack 2.0

Awesome Lists containing this project

README

        

### Development

1. Install dependencies

```
bun install
```

2. Generate database migrations

```
bun run db:generate
```

3. Create the D1 Database

```
bunx wrangler d1 create movies-db
```

4. Add D1 database credentials to wrangler.toml
5. Run the local SQLite database

```
bun run db:up
```

6. Apply migrations to local database

```
bunx wrangler d1 execute movies-db --local --file=./drizzle/migrations/
```

7. Create a .dev.vars file in the root folder which looks like this

```
CLERK_SECRET_KEY=
CLERK_PUBLISHABLE_KEY=
```

8. Start development server

```
bun run dev
```
### Production

1. Apply migrations to D1 database on Cloudflare

```
bunx wrangler d1 execute movies-db --remote --file=./drizzle/migrations/
```

2. Deploy the application

```
bun run deploy
```