const express = require('express'); const path = require('path'); const app = express(); const port = 8080; // app.use(express.static(path.join(__dirname, 'webpage/public'))); // app.get('/', async(req, res) => { //// res.sendFile(path.join(__dirname, 'webpage/public', 'index.html')); // res.sendFile(path.join(__dirname, 'webpage/public', 'index.html')); // }); app.use(express.static(path.join(__dirname, "webpage/public"))); // app.use("/posts", express.static(path.join(__dirname, "webpage/content/posts"))) app.listen(port, () => { console.log(`Server successfully running on port ${port}`); });