Skip to content

Commit 54b479f

Browse files
committed
docs(web): the real-backend recipe has no placeholder to paste, and says what the build needs
1 parent c6d838b commit 54b479f

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

‎docs/WEB.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,11 +280,13 @@ The repo's checks use a stand-in for the account site. To use the real one, loca
280280
`LEVELCODE_WEB_EDITOR_ORIGINS=http://localhost:8800` and `LEVELCODE_WEB_EDITOR_URL=http://localhost:8800/`.
281281
(The gateway refuses plain http, so the editor's API host has to be the tunnel.)
282282
2. **Account site** — the onetime branch: `npm run dev` (it proxies to the backend), at `http://localhost:5173/ai`.
283-
3. **Editor:**
283+
3. **Editor** (from the levelcode repo root; the build needs the bootstrapped `vscode/` checkout, and a git
284+
worktree has none, so pass `--vscode <path to one>` there):
284285

285286
```bash
286-
node scripts/build-web.mjs --account http://localhost:5173 --api-url https://<your tunnel> --out dist-web
287-
node web/serve.mjs --dist dist-web # http://localhost:8800
287+
export API_URL=https://your-tunnel.example.com # the https address of your backend
288+
node scripts/build-web.mjs --account http://localhost:5173 --api-url "$API_URL" --out dist-web
289+
node web/serve.mjs --dist dist-web # http://localhost:8800
288290
```
289291

290292
4. **What to do, and what you should see:**

‎scripts/build-web.mjs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
// 3. lays everything out under a build-addressed prefix (/_/<id>/...), renders index.html with the
1515
// configuration baked in, and writes the HTTP policy for the host (_headers, nginx).
1616
//
17-
// It changes nothing outside --out. It does not deploy.
17+
// It changes nothing outside --out, except that building the client from the checkout leaves gulp's own output,
18+
// vscode-web/, next to it (pass --static to use a client built earlier and skip that). It does not deploy.
1819
import { spawnSync, execFileSync } from 'node:child_process';
1920
import fs from 'node:fs';
2021
import path from 'node:path';

0 commit comments

Comments
 (0)