MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / startServer

Function startServer

Example/testHotUpdate/e2e/globalSetup.js:46–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44}
45
46function startServer() {
47 const serverScript = path.join(projectRoot, 'scripts/local-artifacts-server.js');
48 fs.mkdirSync(artifactsRoot, { recursive: true });
49
50 const child = spawn('node', [serverScript], {
51 cwd: projectRoot,
52 detached: true,
53 stdio: 'ignore',
54 env: {
55 ...process.env,
56 E2E_ASSET_PORT: String(LOCAL_UPDATE_PORT),
57 },
58 });
59 child.unref();
60 fs.writeFileSync(pidFile, String(child.pid));
61}
62
63function waitForServer(timeoutMs = 30000) {
64 const start = Date.now();

Callers 1

globalSetup.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected