2025-10-13 12:44:17 -04:00
|
|
|
# Dependencies to run
|
2025-10-09 17:18:09 -04:00
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
- postgres
|
|
|
|
|
- bun
|
|
|
|
|
- setup biome in ide / editor
|
2025-10-09 17:18:09 -04:00
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
## env
|
2025-10-09 17:18:09 -04:00
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
```env
|
|
|
|
|
DATABASE_URL = "postgresql://concord_user:concord_test@localhost:5432/concord_db"
|
2025-10-09 17:18:09 -04:00
|
|
|
```
|
|
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
# Running
|
2025-10-09 17:18:09 -04:00
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
## API
|
2025-10-09 17:18:09 -04:00
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
```bash
|
|
|
|
|
cd apps/api
|
|
|
|
|
bun run dev
|
2025-10-09 17:18:09 -04:00
|
|
|
```
|
2025-10-13 12:44:17 -04:00
|
|
|
## DB
|
2025-10-09 17:18:09 -04:00
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
```bash
|
|
|
|
|
cd packages/database
|
|
|
|
|
bun run db:generate
|
|
|
|
|
bun run db:migrate
|
|
|
|
|
bun run db:push
|
|
|
|
|
bun run db:seed
|
|
|
|
|
bun run db:studio # optional
|
2025-10-09 17:18:09 -04:00
|
|
|
```
|
|
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
## Linting and Fixing
|
2025-10-09 17:18:09 -04:00
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
```bash
|
|
|
|
|
bunx turbo format-and-lint # view linting and formatting suggestions, without writing
|
|
|
|
|
bunx turbo format-and-lint:fix # write fixes
|
2025-10-09 17:18:09 -04:00
|
|
|
```
|
2025-10-13 12:44:17 -04:00
|
|
|
## Alternatively
|
2025-10-09 17:18:09 -04:00
|
|
|
|
2025-10-13 12:44:17 -04:00
|
|
|
All commands for DB and API can be run from repo root with:
|
|
|
|
|
```bash
|
|
|
|
|
bunx turbo <script> # db:generate, etc...
|
2025-10-09 17:18:09 -04:00
|
|
|
```
|