Files
kapteins-daagbok/docs/deployment/predeploy.md
T
elpatron 0edf4a789c feat(quality): Sprint 2 pre-deploy gates and server smoke tests
Extract Express app factory for testability, add Vitest/Supertest API
smoke tests, root npm run check script, and deployment docs. Fix
express-rate-limit IPv6 keyGenerator for feedback limiter.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-01 15:17:46 +02:00

1.0 KiB

Pre-Deploy-Checks (ohne CI)

Vor jedem Update auf https://kapteins-daagbok.eu/ lokal ausführen:

npm run check

Das Skript scripts/predeploy-check.sh führt aus:

  1. i18n-Key-Validierung (validate:i18n)
  2. Client: testbuild (TypeScript via tsc -b)
  3. Server: testbuild

Einzelbefehle (Repo-Root)

Befehl Inhalt
npm run lint ESLint (Client) — optional, noch nicht Teil von check
npm run test Vitest Client + Server
npm run build Production-Build beider Pakete
npm run predeploy Alias für npm run check

Server-Tests

Smoke-Tests in server/src/api.smoke.test.ts — keine echte Datenbank (Prisma gemockt). Prüfen u. a. Health, 401 ohne Session, öffentliche Collaboration-Validierung.

cd server && npm test

Nach erfolgreichem Check

./scripts/update-prod.sh

Oder manuell auf dem Server: git pull, docker compose build, docker compose up -d (siehe npm-security.md).