Skip to content

docs: clarify which dev server actually serves the app - #57

Merged
vishu-bh merged 1 commit into
mainfrom
docs/clarify-dev-server-scripts
Aug 21, 2026
Merged

docs: clarify which dev server actually serves the app#57
vishu-bh merged 1 commit into
mainfrom
docs/clarify-dev-server-scripts

Conversation

@a-effort

@a-effort a-effort commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Problem

The available scripts table described npm run dev as:

Script Description
npm run dev Start development server

That command starts Vite on :5173, a server with no BFF in front, so every /api/* call fails and you can't log in. The app you actually visit is the BFF on :3000, started by a different npm run dev, inside server/.

Same command name, two different servers, distinguished only by working directory. Nothing in the table says so.

Getting Started documents this correctly: step 2 starts the BFF, and the note after step 4 warns that :5173 "won't reach the ContextForge API on its own", but the scripts table is what people skim when they want to know how to run the project.

Changes

Docs only, one file.

  • Split the two npm run dev entries by directory, and lead with the BFF one.
  • npm run build now says it populates server/public/ for the BFF, rather than just "Build for production". it's also the local dev loop, since there's no HMR wired to the BFF.
  • Added npm run build:watch.
  • Short intro line above the table pointing at Getting Started for the full three-process setup.

Resulting table:

Script Description
npm run dev (in server/) Start the BFF (:3000) — serves the SPA and proxies /api/* to the API
npm run dev Vite dev server (:5173), UI-only — no BFF in front, so /api/* calls won't work
npm run build Build the SPA into server/public/, which the BFF serves (also the local dev loop)
npm run build:watch Rebuild on change — the iteration loop when running against the real API

Notes for review

  • The diff is larger than the change. Longer descriptions widened the column, so Prettier reflowed padding on all ~17 rows. Only the four rows above changed in substance; the rest is whitespace. git diff -w is the readable view.
  • npm run format:check passes.
  • The #getting-started anchor is verified against the ## Getting Started heading at line 30.
  • Deliberately left Getting Started alone (already correct).

The Available Scripts table described `npm run dev` as "Start development
server" with no indication that it starts Vite on :5173 — a server with no
BFF in front, where every /api/* call fails. The app you actually visit is
the BFF on :3000, started by a different `npm run dev` inside server/.

Getting Started already covers this (step 2, plus the note about :5173),
but the scripts table is what gets skimmed when looking up how to run the
project, and it contradicted that guidance. The table also omitted the BFF
dev script and build:watch entirely, leaving no trace of the BFF.

Disambiguate both `npm run dev` entries by directory, describe `npm run
build` as the step that populates server/public/ for the BFF rather than
just "Build for production", and add build:watch. Column widths reflow
because the descriptions got longer.

Signed-off-by: Anna Effort <anna.effort@ibm.com>

@marekdano marekdano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@vishu-bh vishu-bh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@vishu-bh
vishu-bh merged commit 9cbf6d1 into main Aug 21, 2026
5 checks passed
@gcgoncalves
gcgoncalves deleted the docs/clarify-dev-server-scripts branch August 21, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants