Add a mock API with made-up data to look at the console

dev/mock-api.mjs answers the endpoints the screens call, with surrogate data, and keeps
what is changed in memory (zones, scopes, users, groups, rules, sessions, the cache).
`npm run mock` starts it on 127.0.0.1:5380, where the dev server's proxy already points.
.claude/launch.json starts the mock and the console together in the preview pane.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
DenozordecandClaude Sonnet 5.5 committed 2026-10-27 01:36:25 +07:00
1 parent f24f4972ba
commit 44b6dc246c
3 files changed
+318

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "mock-api",
"runtimeExecutable": "node",
"runtimeArgs": ["dev/mock-api.mjs"],
"port": 5380
},
{
"name": "console-dev",
"runtimeExecutable": "npx",
"runtimeArgs": ["vite", "--port", "5173"],
"port": 5173
}
]
}