MCPcopy Index your code
hub / github.com/adobe/react-spectrum / startServer

Function startServer

scripts/testDocs.js:19–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17}
18
19async function startServer() {
20 return new Promise((resolve, reject) => {
21 console.log('Starting documentation server...');
22 const child = exec('yarn start:docs', {
23 env: {...process.env, DOCS_ENV: 'dev'}
24 });
25 child.stdout.on('data', data => {
26 console.log(`Server output: ${data}`);
27 if (data.includes('Server running at')) {
28 console.log('Documentation server is running');
29 resolve({process: child, baseUrl: data.split(' ')[3].trim()});
30 }
31 });
32 child.stderr.on('data', data => {
33 console.error(`Server error: ${data}`);
34 });
35 });
36}
37
38function waitForServer(url, timeout = 30000, interval = 1000) {
39 return new Promise((resolve, reject) => {

Callers 3

index.tsFile · 0.90
index.tsFile · 0.90
testDocsFunction · 0.70

Calls 1

resolveFunction · 0.50

Tested by

no test coverage detected