Skip to content
CodArchthe living map of the architecture
ESEN

codarch serve

Analyses a repository and serves the webapp locally, refreshing it when files change.

Ventana de terminal
codarch serve [path] [options]
OptionWhat it does
-p, --port <n>Local port (1–65535). Defaults to 4173.
--host <host>Interface. Defaults to 127.0.0.1.
--watchRe-analyses on file changes and refreshes the app over SSE. Default.
--no-watchAnalyses only at start.
--no-webAPI mode: serves /data/* without the app (for Vite or another frontend).
-h, --helpHelp.

Prints the URL and keeps running until Ctrl+C. Besides the app it exposes data under /data/ (snapshot.cc.json, rest.cc.json, lint.repmod.json, meta.json, report.json, head-report.json, history.json, …). The rest —documents, configuration and assets— comes from the same pass as the code and is stored in .codarch/rest.cc.json. Lint is a separate file: whatever exists is served, and it is only measured again when the served tree does not match the artifact’s —which codarch analyze signs—, using the lint it detects in the repo; if the repo has no lint there is no artifact and the app stays unmeasured. Without a path it analyses the current folder.

Ventana de terminal
codarch serve .
codarch serve . --port 8080 --no-watch
CodeMeaning
0Server stopped normally.
1Invalid option, missing or disallowed path, invalid .codarch.yml, web build not found or the port could not be opened.