43const allocator=createServer();allocator.listen(0,'127.0.0.1');await once(allocator,'listening');const port=allocator.address().port;await new Promise(resolve=>allocator.close(reso...
44 const baseURL='http://127.0.0.1:'+port;
45 const serverEnv={...env,PORT:String(port),WORK_BIND_HOST:'127.0.0.1',WORK_DATABASE_URL:uri.href,WORK_PG_ALLOW_PRIVATE_NETWORK:'1',WORK_PG_ALLOW_PLAINTEXT:'1',WORK_TIME_ZONE:'Asia/S...
46 async function start(){
47 server=spawn(process.execPath,['server.mjs'],{cwd:root,env:serverEnv,stdio:['ignore','pipe','pipe']});
48 let logs='',failure;server.on('error',error=>failure=error);
49 for(const stream of [server.stdout,server.stderr])stream.on('data',chunk=>logs=(logs+chunk).slice(-8000));
50 for(let i=0;i<240;i++){if(failure||server.exitCode!==null