From aec912cf164733f02983b3e02388019cfa75d09d Mon Sep 17 00:00:00 2001 From: marco370 <48531002-marco370@users.noreply.replit.com> Date: Fri, 21 Nov 2025 15:52:15 +0000 Subject: [PATCH] Fix frontend startup to correctly load environment variables Update `deployment/check_frontend.sh` to load `.env` variables before running `npm run dev`, resolving the `DATABASE_URL must be set` error and improving deployment on non-Replit environments. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 8cf499b5-f15d-4b0d-b459-f48510ac6539 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/dI1I79r --- ...6-CET-2025-1763740277999_1763740277999.txt | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 attached_assets/Pasted--Fri-Nov-21-16-46-54-CET-2025-Frontend-Node-NON-attivo-riavvio-Fri-Nov-21-16-46-56-CET-2025-1763740277999_1763740277999.txt diff --git a/attached_assets/Pasted--Fri-Nov-21-16-46-54-CET-2025-Frontend-Node-NON-attivo-riavvio-Fri-Nov-21-16-46-56-CET-2025-1763740277999_1763740277999.txt b/attached_assets/Pasted--Fri-Nov-21-16-46-54-CET-2025-Frontend-Node-NON-attivo-riavvio-Fri-Nov-21-16-46-56-CET-2025-1763740277999_1763740277999.txt new file mode 100644 index 0000000..8913765 --- /dev/null +++ b/attached_assets/Pasted--Fri-Nov-21-16-46-54-CET-2025-Frontend-Node-NON-attivo-riavvio-Fri-Nov-21-16-46-56-CET-2025-1763740277999_1763740277999.txt @@ -0,0 +1,56 @@ + + + +[Fri Nov 21 16:46:54 CET 2025] Frontend Node NON attivo, riavvio... +[Fri Nov 21 16:46:56 CET 2025] Frontend riavviato con PID: 10083 + +> rest-express@1.0.0 dev +> NODE_ENV=development tsx server/index.ts + +4:46:58 PM [express] serving on port 5000 + +A PostCSS plugin did not pass the `from` option to `postcss.parse`. This may cause imported assets to be incorrectly transformed. If you've recently added a PostCSS plugin that raised this warning, please contact the package author to fix the issue. +4:49:03 PM [express] GET /api/stats 500 in 39ms :: {"error":"Failed to fetch stats"} +4:49:03 PM [express] GET /api/detections 500 in 13ms :: {"error":"Failed to fetch detections"} +4:49:03 PM [express] GET /api/routers 500 in 11ms :: {"error":"Failed to fetch routers"} +4:49:06 PM [express] GET /api/stats 500 in 11ms :: {"error":"Failed to fetch stats"} +4:49:06 PM [express] GET /api/detections 500 in 8ms :: {"error":"Failed to fetch detections"} +4:49:06 PM [express] GET /api/routers 500 in 6ms :: {"error":"Failed to fetch routers"} +4:49:08 PM [express] GET /api/detections 500 in 4ms :: {"error":"Failed to fetch detections"} +4:49:10 PM [express] GET /api/training-history 500 in 42ms :: {"error":"Failed to fetch training his… +4:49:10 PM [express] GET /api/ml/stats 200 in 70ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:49:15 PM [express] POST /api/ml/train 200 in 10ms :: {"message":"Training avviato in background","… +4:49:15 PM [express] GET /api/training-history 500 in 6ms :: {"error":"Failed to fetch training hist… +4:49:15 PM [express] GET /api/ml/stats 200 in 14ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:49:21 PM [express] GET /api/training-history 500 in 7ms :: {"error":"Failed to fetch training hist… +4:49:21 PM [express] GET /api/ml/stats 200 in 20ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:49:27 PM [express] GET /api/training-history 500 in 6ms :: {"error":"Failed to fetch training hist… +4:49:27 PM [express] GET /api/ml/stats 200 in 20ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:49:31 PM [express] GET /api/training-history 500 in 5ms :: {"error":"Failed to fetch training hist… +4:49:31 PM [express] GET /api/ml/stats 200 in 15ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:49:33 PM [express] GET /api/routers 500 in 5ms :: {"error":"Failed to fetch routers"} +4:49:36 PM [express] GET /api/whitelist 500 in 4ms :: {"error":"Failed to fetch whitelist"} +4:49:38 PM [express] GET /api/routers 500 in 4ms :: {"error":"Failed to fetch routers"} +4:49:39 PM [express] GET /api/training-history 500 in 7ms :: {"error":"Failed to fetch training hist… +4:49:39 PM [express] GET /api/ml/stats 200 in 20ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:49:41 PM [express] GET /api/detections 500 in 4ms :: {"error":"Failed to fetch detections"} +4:49:42 PM [express] GET /api/stats 500 in 4ms :: {"error":"Failed to fetch stats"} +4:49:43 PM [express] GET /api/detections 500 in 6ms :: {"error":"Failed to fetch detections"} +4:49:43 PM [express] GET /api/routers 500 in 4ms :: {"error":"Failed to fetch routers"} +4:49:44 PM [express] GET /api/training-history 500 in 5ms :: {"error":"Failed to fetch training hist… +4:49:44 PM [express] GET /api/ml/stats 200 in 19ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:49:54 PM [express] GET /api/training-history 500 in 8ms :: {"error":"Failed to fetch training hist… +4:49:54 PM [express] GET /api/ml/stats 304 in 20ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:49:57 PM [express] GET /api/detections 500 in 4ms :: {"error":"Failed to fetch detections"} +4:49:59 PM [express] GET /api/training-history 500 in 5ms :: {"error":"Failed to fetch training hist… +4:49:59 PM [express] GET /api/ml/stats 304 in 19ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:50:00 PM [express] GET /api/routers 500 in 3ms :: {"error":"Failed to fetch routers"} +4:50:01 PM [express] GET /api/whitelist 500 in 4ms :: {"error":"Failed to fetch whitelist"} +4:50:02 PM [express] GET /api/training-history 500 in 6ms :: {"error":"Failed to fetch training hist… +4:50:02 PM [express] GET /api/ml/stats 304 in 17ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:50:12 PM [express] GET /api/training-history 500 in 5ms :: {"error":"Failed to fetch training hist… +4:50:12 PM [express] GET /api/ml/stats 304 in 18ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:50:22 PM [express] GET /api/training-history 500 in 4ms :: {"error":"Failed to fetch training hist… +4:50:22 PM [express] GET /api/ml/stats 304 in 17ms :: {"logs":{"total":0,"last_hour":0},"detections"… +4:50:32 PM [express] GET /api/training-history 500 in 3ms :: {"error":"Failed to fetch training hist… +4:50:33 PM [express] GET /api/ml/stats 304 in 17ms :: {"logs":{"total":0,"last_hour":0},"detections"… \ No newline at end of file