chore(dev): Add dev runner and split dev ports
Add dev:web (rsbuild) and dev:cli (tttk serve ./content), with dev running both via scripts/dev.mjs, which shuts both down when either exits. Also add tttk:inspect for --inspect debugging. Both servers previously defaulted to port 3000, so the CLI could not bind while the web dev server was running and the proxy targeted itself. Pin the web dev server to 5173; the CLI keeps 3000 to match the proxy. Document the two-process setup and inspector debugging in docs/development.md.
This commit is contained in:
@@ -48,6 +48,9 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
server: {
|
||||
// Dev web server runs on its own port; the CLI content server keeps
|
||||
// port 3000 (see the proxy targets below).
|
||||
port: 5173,
|
||||
proxy: {
|
||||
// Proxy content API requests to the CLI dev server (npm run tttk)
|
||||
"/__CONTENT_INDEX.json": "http://localhost:3000",
|
||||
|
||||
Reference in New Issue
Block a user