This commit is contained in:
Giancarmine Salucci
2025-12-21 02:03:05 +01:00
parent 167cd1f4bb
commit 9357bd483a
36 changed files with 6251 additions and 1547 deletions

View File

@@ -1,27 +1,27 @@
import { initializeBrowser, closeBrowser } from '$lib/server/browser';
// Initialize browser when server starts
export async function init() {
try {
await initializeBrowser();
} catch (error) {
console.error('Failed to initialize browser:', error);
process.exit(1);
}
// Graceful shutdown
process.on('SIGTERM', async () => {
console.log('SIGTERM received, shutting down gracefully...');
await closeBrowser();
process.exit(0);
});
process.on('SIGINT', async () => {
console.log('SIGINT received, shutting down gracefully...');
await closeBrowser();
process.exit(0);
});
}
// Run initialization immediately
init().catch(console.error);
import { initializeBrowser, closeBrowser } from '$lib/server/browser';
// Initialize browser when server starts
export async function init() {
try {
await initializeBrowser();
} catch (error) {
console.error('Failed to initialize browser:', error);
process.exit(1);
}
// Graceful shutdown
process.on('SIGTERM', async () => {
console.log('SIGTERM received, shutting down gracefully...');
await closeBrowser();
process.exit(0);
});
process.on('SIGINT', async () => {
console.log('SIGINT received, shutting down gracefully...');
await closeBrowser();
process.exit(0);
});
}
// Run initialization immediately
init().catch(console.error);