Spaces:
Runtime error
Runtime error
| const express = require('express'); | |
| const app = express(); | |
| const path = require('path'); | |
| app.use(express.static('public')); | |
| app.get('/', (req, res) => { | |
| res.sendFile(path.join(__dirname, 'public', 'index.html')); | |
| }); | |
| const PORT = process.env.PORT || 7860; | |
| app.listen(PORT, () => { | |
| console.log(`Server is running on port ${PORT}`); | |
| }); |