Let the showcase seed write a deployed database with --production

A database under /var/lib/ngu is still refused by default; adding
--production allows it, for a server that exists to be tested, and
the script says which database it is writing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zaldimmar 2026-09-27 17:05:22 -05:00
parent 422e521394
commit 9b6d9b9aff
2 changed files with 17 additions and 5 deletions

View file

@ -22,7 +22,7 @@ Backend (`server/`, Node >= 22). The server reads `HOST` (default `127.0.0.1`),
- `DB_PATH=./dev.db pnpm dev`: run with `node --watch`
- `DB_PATH=./dev.db pnpm migrate`: apply migrations without starting the server
- `DB_PATH=./dev.db node src/admin-cli.js add|list|passwd|role|disable|enable ...`: the only way accounts are created
- `DB_PATH=./dev.db node src/seed-showcase.js [--listed]`: writes fully filled test records (a region, chapter, team, award, person, three events and a blog post with every content block type), ids starting `showcase-`, for checking pages. Unlisted unless `--listed`. Local only; refuses /var/lib/ngu.
- `DB_PATH=./dev.db node src/seed-showcase.js [--listed]`: writes fully filled test records (a region, chapter, team, award, person, three events and a blog post with every content block type), ids starting `showcase-`, for checking pages. Unlisted unless `--listed`. Refuses a database under /var/lib/ngu unless `--production` is also given.
In dev, Vite proxies `/api` to the target set in `vite.config.ts`, so the API must listen on that port.