feat(backend): implement REST API for races calendar
Express + TypeScript backend with PostgreSQL: CRUD endpoints for /races (GET list with year/month filters, GET by id, POST, PATCH, DELETE), health/readiness probes, SQL migration runner, seed script with upsert from CSV, camelCase/snake_case mapper, CORS, env validation, docker-compose, and API docs for frontend. Made-with: Cursor
This commit is contained in:
18
.env.example
Normal file
18
.env.example
Normal file
@@ -0,0 +1,18 @@
|
||||
# ─── PostgreSQL ───────────────────────────────────────────────
|
||||
DB_HOST=localhost
|
||||
DB_PORT=5432
|
||||
DB_NAME=calendar_run
|
||||
DB_USER=calendar_user
|
||||
DB_PASSWORD=calendar_pass
|
||||
|
||||
# ─── Backend API ──────────────────────────────────────────────
|
||||
# Port the API server listens on
|
||||
API_PORT=3001
|
||||
|
||||
# ─── CORS ─────────────────────────────────────────────────────
|
||||
# Allowed origin for the frontend (Vite dev server default)
|
||||
CORS_ORIGIN=http://localhost:5173
|
||||
|
||||
# ─── Frontend (Vite) ─────────────────────────────────────────
|
||||
# Public URL of the API, used in SPA code via import.meta.env
|
||||
VITE_API_BASE_URL=http://localhost:3001
|
||||
Reference in New Issue
Block a user