Bas van Rossem 2fa8aa9154 test(api): Infra (health/db/schema/seed/env/migrate) — fill gaps + lifecycle test
Drives all infra src files to 100% (env.ts, db/client.ts, db/ensure-dir.ts,
db/migrate.ts, db/seed.ts, routes/health.ts).

- env.test.ts: dev defaults when unset, overrides when set (PORT coerced),
  CORS_ORIGINS parsing (trim + drop empties) and empty-fallback.
- db.test.ts: runMigrations idempotency; ensureDbDir no-op for non-file URLs
  and bare filenames (branch coverage).
- seed.test.ts: production guard — no dev users seeded when NODE_ENV=production.
- c8-ignore the migrate.ts/seed.ts CLI direct-run blocks (unreachable under vitest).

No lifecycle test (infra domain, per plan). No bugs found — infra code correct;
only coverage gaps. All 112 API tests green; typecheck + oxlint clean.
2026-07-22 11:39:34 +02:00

SoleLog docs

Running the backend (Phase 0)

Local (dev):

yarn install
cp apps/api/.env.example apps/api/.env   # edit BETTER_AUTH_SECRET
yarn workspace @solelog/api db:migrate
yarn workspace @solelog/api dev

Docker (whole stack):

docker compose up --build
# health: curl http://localhost:3000/health
Description
No description provided
Readme 4.2 MiB
Languages
TypeScript 95.3%
CSS 3.8%
Dockerfile 0.7%
HTML 0.2%