Skip to content

Commit 596cd15

Browse files
committed
docs(AGENTS.md): the dev-server port is a default, not hard-wired
Three contributor lines now say what the code does. `pnpm run setup` is install plus the spec build only, and `pnpm dev`'s preflight wants a full `pnpm build` (scripts/check-dev-prereqs.mjs), so the line no longer calls it the first-time step. The dev-server row drops "Port must be 3000 (UI hard-wired)": `os dev` reads `--port`, then `OS_PORT`, then the legacy `PORT`, defaults to 3000 and shifts off a busy port (packages/cli/src/commands/dev.ts), and the Console dev proxy targets `DEV_PROXY_TARGET || http://localhost:3000` (ui/apps/console/vite.config.ts). The fast-iteration paragraph spells the documented `OS_PORT`. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QSeKYmhU5KEj1nukYhp1Tg
1 parent fbc1656 commit 596cd15

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎AGENTS.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ stated once here and the script's own header is the authority on detail.
3737

3838
```bash
3939
pnpm install # deps
40-
pnpm run setup # first-time: install + build spec (bare `pnpm setup` is pnpm's own built-in)
40+
pnpm run setup # install + build spec only; `pnpm dev` needs `pnpm build` (bare `pnpm setup` is pnpm's own built-in)
4141
pnpm build # turbo build (excludes docs)
4242
pnpm test # turbo test
4343
pnpm typecheck # turbo typecheck — per-package `tsc --noEmit`; tsup/vitest never type-check
@@ -135,7 +135,7 @@ layer at least as close to the code (ruling record 6120820653).
135135

136136
| Scenario | Command | Notes |
137137
|:---|:---|:---|
138-
| **Frontend debug** (the Console in `ui/` calls backend) | `PORT=3000 pnpm dev` | `pnpm dev` = the **showcase** kitchen-sink app (default; best for exercising the platform). Port **must** be 3000 (UI hard-wired); persistent state; leave running. For the minimal CRM app instead: `PORT=3000 pnpm dev:crm`. |
138+
| **Frontend debug** (the Console in `ui/` calls backend) | `OS_PORT=3000 pnpm dev` | `pnpm dev` = the **showcase** kitchen-sink app (default; best for exercising the platform). Port 3000 is the default, not hard-wired: the Console dev proxy targets it unless `DEV_PROXY_TARGET` says otherwise, and a busy port shifts to the next free one, so read the port it prints (`PORT` is the legacy alias of `OS_PORT`); persistent state; leave running. For the minimal CRM app instead: `OS_PORT=3000 pnpm dev:crm`. |
139139
| **Backend-only debug** | `pnpm dev -- --fresh -p <random>` | Random high port; ephemeral tempdir; **you must kill it** when done |
140140

141141
`--fresh`: ephemeral tempdir (auto-deleted on exit) + `--seed-admin` (POSTs sign-up, prints creds — default
@@ -167,8 +167,8 @@ ships that same tracked file in `packages/console/dist/`. Full procedure: `docs/
167167

168168
**Fast iteration on `ui/` src (no rebuild loop):** run the Console dev server —
169169
`pnpm --filter @object-ui/console dev` (Vite on **:5180**, HMR). Its `/api` proxy targets
170-
`DEV_PROXY_TARGET || http://localhost:3000`, so **run the backend you're testing on :3000** (`PORT=3000 pnpm dev` for
171-
showcase) and browse `:5180`. Note `:3001/_console` (or whatever the backend serves) is the **built** console, not
170+
`DEV_PROXY_TARGET || http://localhost:3000`, so **run the backend you're testing on :3000** (`OS_PORT=3000 pnpm dev`
171+
for showcase) and browse `:5180`. Note `:3001/_console` (or whatever the backend serves) is the **built** console, not
172172
your `ui/` src — only `:5180` reflects local UI edits. See `ui/AGENTS.md` for the app-id /
173173
localStorage / auth gotchas.
174174

0 commit comments

Comments
 (0)