GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode-mobile/scripts/serve-web-prebuilt.mjs at main · drpr/opencode-mobile

Expand file tree

/

serve-web-prebuilt.mjs

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
37 lines (31 loc) · 1.32 KB
/

serve-web-prebuilt.mjs

Copy path

File metadata and controls

37 lines (31 loc) · 1.32 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Serve an existing `dist-e2e` export on the web E2E port without rebuilding.
//
// Start this in one terminal, then run a targeted Playwright command in
// another. Playwright's `reuseExistingServer` (enabled outside CI) detects the
// running server and skips the export.
import { spawn } from 'node:child_process';
import { existsSync } from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
const root = path.join(path.dirname(fileURLToPath(import.meta.url)), '..');
const port = process.env.E2E_WEB_PORT || '19006';
const serve = path.join(root, 'node_modules', 'serve', 'build', 'main.js');
const marker = path.join(root, 'dist-e2e', '.e2e-build');
if (!existsSync(path.join(root, 'dist-e2e', 'index.html'))) {
console.error('[e2e] dist-e2e/index.html is missing. Run `npm run build:web:e2e` first.');
process.exit(1);
}
if (!existsSync(marker)) {
console.warn('[e2e] dist-e2e was not produced by build:web:e2e; rebuild it if tests connect to 127.0.0.1:4096.');
}
const child = spawn(process.execPath, [serve, '-s', 'dist-e2e', '-l', port], {
cwd: root,
stdio: 'inherit',
});
for (const signal of ['SIGINT', 'SIGTERM']) {
process.on(signal, () => child.kill(signal));
}
child.on('exit', (code, signal) => {
if (signal) process.kill(process.pid, signal);
else process.exit(code ?? 1);
});
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.