Skip to content

Commit c57b612

Browse files
os-zhuangclaude
andauthored
fix(docs): correct os dev default port from 3002 to 3000 (#234)
`reference/cli.mdx:70` claimed `os dev` defaults to port 3002. PR #143 measured the real behavior (against @objectstack/cli 17.1.0) and landed it in quickstart.mdx: os dev asks for 3000, the same port os start uses, and binds the next free port on collision. Re-verified here against 17.2.0's shipped source (packages/cli/src/commands/dev.ts, `requestedPort = port ?? '3000'`) — the default and the collision/rebind behavior are unchanged. Corrects line 70's comment and adds a short note under the block carrying the collision behavior, since that is the part that surprises a reader running `os dev` alongside `os start`. Also updates the -p example on line 71 from 4002 to 4000, since 4002 read as "3002 plus a bit." Fixes #229 Co-authored-by: Claude <noreply@anthropic.com>
1 parent 13e1ead commit c57b612

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎content/docs/reference/cli.mdx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ Watches `objectstack.config.ts` and `src/`. Recompiles + reloads on
6767
save. Used as the npm `dev` script in scaffolded projects.
6868

6969
```bash
70-
os dev # port 3002 by default
71-
os dev -p 4002
70+
os dev # port 3000 by default
71+
os dev -p 4000
7272
```
7373

74+
Note `os dev` asks for the same port `os start` uses (3000). If that port
75+
is taken it binds the next free one and says so:
76+
`↪ server bound to port 3001 (requested 3000)`.
77+
7478
## Project commands
7579

7680
### `os init` — scaffold a new project

0 commit comments

Comments
 (0)