fix: serve design studio through the component app production route

This commit is contained in:
Clintchiz committed 2026-10-19 13:34:08 +05:30
1 parent 3987ddbcfe
commit 9a6a2e0a8d
11 files changed
+174 -47

No files matched your search

+9 -7
View File
@@ -88,13 +88,15 @@ bun run check
PORT=3000 bun run start
```
`start` runs the production component site and an export-only Studio sidecar
bound to loopback port 4320. Include `deploy/nginx-design-studio.conf` inside your
existing nginx server block, retain its existing component-site proxy, validate
with `nginx -t`, then reload nginx. The proxy must preserve `/design-studio/` and
Host, and pass Origin unchanged. If port 4320 is occupied, set DESIGN_STUDIO_PORT
and update the proxy upstream to the same port. Manage the `bun run start`
process using your existing service manager and restart it after each build.
`start` runs one production server. Design Studio is mounted directly at
`/design-studio/` by `app/middleware/design-studio.ts`, so the same route works
with `bun dist/server.js` and with the development server. No extra port or
Studio-specific proxy rule is needed. Your existing reverse proxy should forward
all paths to the normal app port and preserve Host, Origin and X-Forwarded-Proto.
If you installed the older Studio-only nginx location pointing to port 4320,
remove it so `/design-studio/` follows the app's normal proxy route. Validate with
`nginx -t`, then reload nginx. Rebuild and restart the application after updating.
The optional `bun run studio` command is only for running a separate demo server.
The private `@wrnexus` registry is configured in `.npmrc`. Supply registry
credentials on the VM through its user configuration or secret store; no tokens