# Pour installer en tant que service systemd: # 1. Copier ce fichier vers /etc/systemd/system/monitoring-ws.service # 2. Exécuter: sudo systemctl daemon-reload # 3. Exécuter: sudo systemctl enable monitoring-ws # 4. Exécuter: sudo systemctl start monitoring-ws [Unit] Description=S2S Monitoring WebSocket Server After=network.target [Service] Type=simple User=www-data WorkingDirectory=/var/www/html/monitoring-ws ExecStart=/usr/bin/node /var/www/html/monitoring-ws/server.js Restart=always RestartSec=10 Environment=NODE_ENV=production Environment=PORT=3001 [Install] WantedBy=multi-user.target