diff --git a/.env.example b/.env.example index 241cd77..cea3a1f 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,8 @@ PORT=8080 -DATABASE_DSN=walkies.db +DB_HOST=localhost +DB_PORT=3306 +DB_USER=root +DB_PASSWORD= +DB_NAME=walkies JWT_SECRET=change-me-in-production -STATIC_DIR=./web/build +STATIC_DIR=./web/dist diff --git a/README.md b/README.md index 2da0369..7504ff5 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,9 @@ A web-based application for an animal shelter to manage volunteer scheduling, ti ## Requirements -- [Go](https://golang.org/) 1.21+ -- [Node.js](https://nodejs.org/) 18+ +- [Go](https://golang.org/) 1.25+ +- [Node.js](https://nodejs.org/) 22+ +- [MySQL](https://www.mysql.com/) 8.0 - [Task](https://taskfile.dev/) (`brew install go-task` or see [install docs](https://taskfile.dev/installation/)) - [Docker](https://www.docker.com/) (optional, for containerised deployment) @@ -64,8 +65,12 @@ The server is configured via environment variables: | Variable | Default | Description | |----------|---------|-------------| | `PORT` | `8080` | HTTP listen port | -| `DATABASE_DSN` | `walkies.db` | SQLite file path | +| `DB_HOST` | `localhost` | MySQL host | +| `DB_PORT` | `3306` | MySQL port | +| `DB_USER` | `root` | MySQL username | +| `DB_PASSWORD` | *(empty)* | MySQL password | +| `DB_NAME` | `walkies` | MySQL database name | | `JWT_SECRET` | `change-me-in-production` | HMAC signing key — **change this** | -| `STATIC_DIR` | `./web/build` | Path to compiled React app | +| `STATIC_DIR` | `./web/dist` | Path to compiled React app | Copy `.env.example` to `.env` to set these locally (the server reads environment variables directly; use a process manager or Docker to inject them).