docs(architecture): the static server serves six files, and its table lists four rules #2195

Merged
jaylouisw merged 1 commit from docs/1119-1847 into main 2026-11-19 18:54:03 +00:00
Owner

docs/ARCHITECTURE.md -> "What the static server answers" said web/ is four files with three rules.

  • web/ holds six: index.html, app.js, canvas.js, faceplate.js, style.css, faceplate.css (ls web/). The count was already wrong in the commit that wrote it (#1312), so it never described the tree.
  • serveStatic() (server/index.js) serves whatever path resolves inside WEB_DIR; there is no four-entry list of filenames to be right about.
  • The table under that sentence has four rows and the function implements four: 405 with Allow: GET, HEAD for a non-read, 404 text/plain when a named file is missing, / and extensionless paths answered with index.html, and HEAD answered with the GET headers and no body (including the gzip branch).

Docs only - no engine, server or test change.

Guards: scripts/syntax-check.js 461 files OK; docs-show-commands 7/7 (59 show forms, 118 commands typed); help-completeness 8/8; docs-cli-transcript 9/9; doc-catalog-counts 43/43; help-key-is-not-a-value 40/40; no-form-help-key 81/81.

`docs/ARCHITECTURE.md` -> "What the static server answers" said `web/` is **four files** with **three rules**. - `web/` holds six: `index.html`, `app.js`, `canvas.js`, `faceplate.js`, `style.css`, `faceplate.css` (`ls web/`). The count was already wrong in the commit that wrote it (#1312), so it never described the tree. - `serveStatic()` (`server/index.js`) serves whatever path resolves inside `WEB_DIR`; there is no four-entry list of filenames to be right about. - The table under that sentence has four rows and the function implements four: 405 with `Allow: GET, HEAD` for a non-read, 404 `text/plain` when a named file is missing, `/` and extensionless paths answered with `index.html`, and `HEAD` answered with the `GET` headers and no body (including the gzip branch). Docs only - no engine, server or test change. Guards: `scripts/syntax-check.js` 461 files OK; docs-show-commands 7/7 (59 show forms, 118 commands typed); help-completeness 8/8; docs-cli-transcript 9/9; doc-catalog-counts 43/43; help-key-is-not-a-value 40/40; no-form-help-key 81/81.
docs(architecture): the static server serves six files and the table has four rules
All checks were successful
CI / Classify the change (pull_request) Successful in 14s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 11s
CI / Server smoke test (pull_request) Has been skipped
CI / Docker build (pull_request) Has been skipped
CI / Test (Node 20) (pull_request) Successful in 56s
CI / Test (Node 22) (pull_request) Successful in 56s
CI / Test (Node 18) (pull_request) Successful in 1m2s
CI / Arm auto-merge (pull_request) Successful in 4s
ca66c30174
`web/` is named by the section as "four files", and has held six since the front panel
landed: index.html, app.js, canvas.js, faceplate.js, style.css, faceplate.css. The
sentence was written in #1312, when the tree already had all six, so the count never
matched - `serveStatic()` joins any path under `WEB_DIR` and serves it, with no list of
its own to be four entries long.

The same sentence says "three rules" over a table with four rows (SPA fallback, 404 for
a missing asset, 405 for a write, HEAD with no body), and `serveStatic()` implements all
four: the method gate, the extension branch for 404, the `/` -> index.html fallback, and
the HEAD return before either body is written.

Docs only; no code touched.
forgejo-actions scheduled this pull request to auto merge when all checks succeed 2026-11-19 18:51:38 +00:00
jaylouisw deleted branch docs/1119-1847 2026-11-19 18:54:04 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!2195
No description provided.