Trigger Azure deployment - fix server.js missing issue

This commit is contained in:
idittrich-valueon 2025-06-04 12:20:50 +02:00
parent 93ad90ff70
commit 81858b47c5
2 changed files with 19 additions and 0 deletions

BIN
README.md Normal file

Binary file not shown.

19
server.js Normal file
View file

@ -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}`);
});