Spaces:
Running
Running
File size: 353 Bytes
8836628 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
const express = require('express');
const path = require('path');
const app = express();
const port = 3000;
app.use(express.static(path.join(__dirname, 'public')));
app.get('/', (req, res) => {
res.sendFile(path.join(__dirname, 'public', 'index.html'));
});
app.listen(port, () => {
console.log(`Server running on http://localhost:${port}`);
}); |