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
- Host: GitHub
- URL: https://github.com/aayush0325/movies-backend
- Owner: aayush0325
- Created: 2024-08-10T17:55:16.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-30T07:57:48.000Z (8 months ago)
- Last Synced: 2025-01-21T01:17:50.276Z (3 months ago)
- Topics: cloudflare-d1, cloudflare-d1-with-drizzle-orm, cloudflare-workers, drizzle-orm, hono, honojs, nodejs, typescript, zod
- Language: TypeScript
- Homepage:
- Size: 202 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```
### Production1. Apply migrations to D1 database on Cloudflare
```
bunx wrangler d1 execute movies-db --remote --file=./drizzle/migrations/
```2. Deploy the application
```
bun run deploy
```