Skip to content

GUI: add npm start --server=<domain> to run the GUI against a remote … - #3481

Merged
jelveh merged 1 commit into
mainfrom
gui-remote-backend-mode
Jul 30, 2026
Merged

GUI: add npm start --server=<domain> to run the GUI against a remote …#3481
jelveh merged 1 commit into
mainfrom
gui-remote-backend-mode

Conversation

@jelveh

@jelveh jelveh commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

…backend

  • npm start --server=puter.com (or -- --server=...) skips the local backend and serves the bundled GUI locally, pointed at the remote server's API. Bare domains resolve to https://api.; full origins are used verbatim. gui_origin points at the remote origin so /whoarewe, login, anti-csrf, socket.io, and builtin apps hit the real backend (CORS-open).
  • --extensions=[;...] bundles out-of-tree GUI extension directories (sugar for PUTER_GUI_EXTENSION_PATHS). Their imports resolve as if the files lived in src/gui/src/extensions, with the extension's own files taking precedence, and bare imports fall back to the repo-root node_modules.
  • Fix the bit-rotted dev-server: Express 5 wildcard routes, pass gui() params (previously called with none), inject the service_script shim, load bundle.min.js + bundle.min.css in prod mode, serve /sdk, and properly await the webpack build (it previously resolved immediately).

…backend

- npm start --server=puter.com (or -- --server=...) skips the local backend
  and serves the bundled GUI locally, pointed at the remote server's API.
  Bare domains resolve to https://api.<domain>; full origins are used
  verbatim. gui_origin points at the remote origin so /whoarewe, login,
  anti-csrf, socket.io, and builtin apps hit the real backend (CORS-open).
- --extensions=<dir>[;<dir>...] bundles out-of-tree GUI extension
  directories (sugar for PUTER_GUI_EXTENSION_PATHS). Their imports resolve
  as if the files lived in src/gui/src/extensions, with the extension's own
  files taking precedence, and bare imports fall back to the repo-root
  node_modules.
- Fix the bit-rotted dev-server: Express 5 wildcard routes, pass gui()
  params (previously called with none), inject the service_script shim,
  load bundle.min.js + bundle.min.css in prod mode, serve /sdk, and
  properly await the webpack build (it previously resolved immediately).
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report for puter.js SDK

Status Category Percentage Covered / Total
🔵 Lines 36.04%
⬆️ +0.05%
2126 / 5898
🔵 Statements 35.07%
⬆️ +0.04%
2218 / 6323
🔵 Functions 32.42%
⬆️ +0.09%
359 / 1107
🔵 Branches 28.35%
⬆️ +0.05%
1198 / 4225
File CoverageNo changed files found.
Generated in workflow #102 for commit ac0aabf by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 77.63%
🟰 ±0%
17226 / 22188
🔵 Statements 75.95%
🟰 ±0%
18343 / 24151
🔵 Functions 74.37%
🟰 ±0%
2868 / 3856
🔵 Branches 64.66%
🟰 ±0%
12122 / 18747
File CoverageNo changed files found.
Generated in workflow #627 for commit ac0aabf by the Vitest Coverage Report Action

@jelveh
jelveh merged commit b55782f into main Jul 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant