Files
wehub-resource-sync 3cd11ababe
Check Markdown links / linkChecker (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:38:56 +08:00

23 lines
559 B
JavaScript

import { spawn } from 'node:child_process';
console.log('Starting the application...');
const app = spawn('node', ['build/start-server.js', '--headless'], {
stdio: 'inherit',
});
// Listen for errors when spawning the process
app.on('exit', (err) => {
console.error('Failed to start the app:', err);
process.exit(1); // Exit with a failure code if there is an error
});
// Listen for when the process starts
app.on('spawn', () => {
console.log('App started successfully');
setTimeout(() => {
app.kill();
process.exit(0);
}, 3000);
});