---
name: api-server dev has no watch
description: The api-server dev workflow builds once at startup; backend edits need a workflow restart to take effect.
---

The `@workspace/api-server` dev script is `pnpm run build && pnpm run start`
(esbuild bundle to `dist/index.mjs`, then `node dist/index.mjs`). There is **no
watch/rebuild**. The running server is the compiled bundle, not the TypeScript
source.

**Why:** After editing any backend route/lib, the live server keeps serving the
old bundle. Symptom: new endpoints 404 with an HTML "Cannot GET /api/..." page,
or new logic silently doesn't run, even though `tsc --noEmit` passes on source.

**How to apply:** After any edit under `artifacts/api-server/src/**`, restart the
`artifacts/api-server: API Server` workflow before cur/e2e testing. tsc passing
is necessary but NOT sufficient — it checks source, not the running bundle.
