Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions apps/console/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,8 +32,11 @@ pnpm test
```

The console is a **pure SPA** and requires an external ObjectStack backend.
Point it at any running ObjectStack instance via `VITE_SERVER_URL` in
`apps/console/.env.development` (defaults to `http://localhost:3000`).
`VITE_SERVER_URL` in `apps/console/.env.development` ships empty (same-origin);
the Vite dev server proxies `/api/*` to `http://localhost:3000` by default, or
to `DEV_PROXY_TARGET` when set — e.g.
`DEV_PROXY_TARGET=https://demo.objectstack.ai pnpm dev` — to point dev at a
different backend without leaving same-origin.

To run a backend locally, use the `@objectstack/cli` from a separate
ObjectStack project checkout — we no longer ship an in-repo dev-server
Expand All@@ -49,9 +52,11 @@ The console runs as a standalone SPA against any ObjectStack backend:

- Vite dev server with Hot Module Replacement (HMR), opens at
http://localhost:5180.
- Talks to the ObjectStack backend defined by `VITE_SERVER_URL`
(default `http://localhost:3000`).
- Vite proxies `/api/*` and `/_account/*` to that backend.
- `VITE_SERVER_URL` is empty by default (same origin); Vite proxies `/api/*`
to `http://localhost:3000`, or to `DEV_PROXY_TARGET` when set, to reach the
ObjectStack backend.
- Only `/api/*` is proxied — `/_auth/*` and `/_account/*` are **not**
proxied.

### 2. Standalone SPA preview
**Command:** `pnpm start`
Expand Down
9 changes: 7 additions & 2 deletions examples/console-starter/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -88,8 +88,13 @@ ObjectStack server serves the console itself.

| File | Value |
|---|---|
| [`.env.development`](./.env.development) | `http://localhost:3000` |
| [`.env.production`](./.env.production) | `https://demo.objectstack.ai` |
| [`.env.development`](./.env.development) | empty (same-origin) |
| [`.env.production`](./.env.production) | empty (same-origin) |

Both files ship empty. In dev, the Vite server proxies `/api/*` to
`http://localhost:3000` by default; to point dev at a different backend while
keeping one origin, set `DEV_PROXY_TARGET`, e.g.
`DEV_PROXY_TARGET=https://demo.objectstack.ai pnpm dev`.

Point it at any ObjectStack server. If you need one locally, this repo's live-e2e
helper [`e2e/live/ci/start-backend.sh`](../../e2e/live/ci/start-backend.sh) boots a
Expand Down