feat: add Drizzle ORM support and update README with environment setup and migration scripts

This commit is contained in:
2025-12-07 10:20:00 +00:00
parent 546573c694
commit 27d14ac112
8 changed files with 91 additions and 5 deletions

View File

@@ -1,15 +1,47 @@
# backend
To install dependencies:
## Install
```bash
bun install
```
To run:
## Environment
Create a `.env` file:
```bash
bun run index.ts
cp .env.example .env
```
This project was created using `bun init` in bun v1.3.5. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
Set:
```bash
DATABASE_URL=postgres://username:password@localhost:5432/database_name
```
## Run app
```bash
bun run dev
```
## Drizzle ORM
Generate migrations:
```bash
bun run db:generate
```
Apply migrations:
```bash
bun run db:migrate
```
Open Drizzle Studio:
```bash
bun run db:studio
```