diff --git a/README.md b/README.md new file mode 100644 index 0000000..36fc528 Binary files /dev/null and b/README.md differ 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