Spaces:
Running
Running
const express = require('express'); | |
const app = express(); | |
const path = require('path'); | |
// Serve static files from the current directory | |
app.use(express.static(__dirname)); | |
// Start the server | |
const PORT = process.env.PORT || 3000; | |
app.get('/favicon.ico', (req, res) => res.status(204)); | |
app.listen(PORT, () => { | |
console.log(`Server is running on http://localhost:${PORT}`); | |
}); | |