This commit is contained in:
Giancarmine Salucci
2026-02-18 01:21:44 +01:00
parent 54321fd7c9
commit 49bccf8f15
84 changed files with 14474 additions and 13925 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);