6 lines
277 B
TypeScript
6 lines
277 B
TypeScript
|
|
import { spawn } from 'child_process';
|
||
|
|
const child = spawn('npx', ['tsx', 'server.ts']);
|
||
|
|
child.stdout.on('data', data => console.log(data.toString()));
|
||
|
|
child.stderr.on('data', data => console.error(data.toString()));
|
||
|
|
setTimeout(() => { child.kill(); process.exit(0); }, 5000);
|