From 81858b47c5dbadc5ad756d3c649bffec2814ecc1 Mon Sep 17 00:00:00 2001 From: idittrich-valueon Date: Wed, 4 Jun 2025 12:20:50 +0200 Subject: [PATCH] Trigger Azure deployment - fix server.js missing issue --- README.md | Bin 0 -> 46 bytes server.js | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 README.md create mode 100644 server.js diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..36fc52810a1b41477b92fbfe6fd3ceafbc010633 GIT binary patch literal 46 wcmezWPnki1A%vlbA(J5;2vdP91%?zLUBHmTkk3%bkPBqzF_bXyGH@{f00>tJjQ{`u literal 0 HcmV?d00001 diff --git a/server.js b/server.js new file mode 100644 index 0000000..bd5984e --- /dev/null +++ b/server.js @@ -0,0 +1,19 @@ +const express = require('express'); +const path = require('path'); +const app = express(); + +// Serve static files from the dist directory +app.use(express.static(path.join(__dirname, 'dist'))); + +// Handle React Router - send all requests to index.html +app.get('/*', function(req, res) { + res.sendFile(path.join(__dirname, 'dist', 'index.html')); +}); + +// Use Azure's PORT environment variable or fallback to 3000 +const port = process.env.PORT || 3000; + +// Listen on all interfaces (important for Azure) +app.listen(port, '0.0.0.0', () => { + console.log(`Server running on port ${port}`); +}); \ No newline at end of file