docs: document two-process dev workflow with Vite proxy
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -25,3 +25,20 @@ Forgejo Actions handles:
|
||||
- Container image build + push to the Forgejo registry on merge to `main` (`:main`) and on `v*` tags (`:<version>`).
|
||||
|
||||
Task and milestone tracking: Fable (`Minstrel` project, id 12).
|
||||
|
||||
## Development
|
||||
|
||||
Minstrel has two concurrent dev processes:
|
||||
|
||||
1. **Backend:** `docker compose up` — starts Postgres and Minstrel on `:4533`.
|
||||
2. **Frontend:** `cd web && npm install && npm run dev` — Vite dev server on `:5173` with HMR.
|
||||
|
||||
The Vite dev server proxies `/api/*` and `/rest/*` to the backend on `:4533`,
|
||||
so session cookies work correctly when the SPA is loaded from the Vite origin.
|
||||
|
||||
### Production build
|
||||
|
||||
`docker build -t minstrel .` runs the SvelteKit build inside a `node` stage,
|
||||
copies the output into the `golang` stage, and `//go:embed`s it into the
|
||||
final binary. The resulting container serves the SPA from `/` alongside the
|
||||
API surfaces. No separate static-file server is required.
|
||||
|
||||
Reference in New Issue
Block a user