start-visum-background.mjsā¢1.11 kB
// Script per avviare istanza Visum persistente in background
import { PersistentVisumController } from './build/persistent-visum-controller.js';
console.log('š Starting Visum persistent instance in background...');
const controller = PersistentVisumController.getInstance();
try {
const result = await controller.startPersistentVisumProcess();
if (result.success) {
console.log('ā
Visum instance started successfully!');
console.log(`š Network: ${result.nodes} nodes, ${result.links} links, ${result.zones} zones`);
console.log('š Instance is now running in background and ready for commands...');
console.log('š” Use other scripts to send commands to this persistent instance');
// Mantieni il processo attivo
console.log('š Keeping process alive for background operation...');
setInterval(() => {
// Noop - mantiene il processo Node.js attivo
}, 30000);
} else {
console.log('ā Failed to start:', result.message);
process.exit(1);
}
} catch (error) {
console.error('ā Error:', error.message);
process.exit(1);
}