Files
TIS-website/run.js
2023-10-02 13:59:38 +03:00

19 lines
618 B
JavaScript

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}`);
});