docs: clarify which dev server actually serves the app - #57
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The available scripts table described
npm run devas:npm run devThat 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 differentnpm run dev, insideserver/.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.
npm run deventries by directory, and lead with the BFF one.npm run buildnow says it populatesserver/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.npm run build:watch.Resulting table:
npm run dev(inserver/):3000) — serves the SPA and proxies/api/*to the APInpm run dev:5173), UI-only — no BFF in front, so/api/*calls won't worknpm run buildserver/public/, which the BFF serves (also the local dev loop)npm run build:watchNotes for review
git diff -wis the readable view.npm run format:checkpasses.#getting-startedanchor is verified against the## Getting Startedheading at line 30.