feat(web): add the dashboard server façade + wire Sidequest.start({ dashboard })#203
Open
merencia wants to merge 1 commit into
Open
feat(web): add the dashboard server façade + wire Sidequest.start({ dashboard })#203merencia wants to merge 1 commit into
merencia wants to merge 1 commit into
Conversation
a4a81e1 to
e2c1875
Compare
| } | ||
| try { | ||
| const specifier = "@sidequest/web/server"; | ||
| const web = (await import(specifier)) as WebServer; |
0616f93 to
994e38c
Compare
e2c1875 to
2654e76
Compare
…ashboard })
adds `@sidequest/web/server` `serveDashboard()`: one hono server that mounts the
management api under `<basePath>/api` and serves the built spa for everything else,
with optional basic auth. reconciles the client↔api base by injecting
`window.__SQ_DASHBOARD_BASE__` into the served index.html (the spa uses hash routing
and relative assets, so one build serves any base path). the spa build joins
`yarn build` (dist/app) and the server gets its own rollup entry (dist/server).
re-wires the umbrella: `Sidequest.start({ dashboard: { enabled, port, basePath, auth } })`
lazily imports the façade and boots it with the engine's backend and driver; `stop()`
closes it. this also feeds the real driver/version into the /api/system engine-status.
verified end-to-end against a migrated sqlite backend (api, spa, system, base path).
994e38c to
79d81f6
Compare
2654e76 to
c65ac73
Compare
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.
stacked on #202.
serveDashboard()in@sidequest/web/server: one hono server mounting the api under<basePath>/apiand serving the built spa, with optional basic auth. the piece that makes the v2 dashboard run end to end.