Stirling-PDF/index.js

18 lines
375 B
JavaScript
Raw Normal View History

2023-10-16 23:11:33 +02:00
import express from 'express';
2023-10-16 23:11:33 +02:00
const app = express();
const PORT = 8080;
// Static Middleware
app.use(express.static('./public'));
2023-10-16 23:11:33 +02:00
app.get('/', function (req, res, next) { // TODO: Use EJS?
2023-10-16 23:11:33 +02:00
res.render('home.ejs');
});
// TODO: Import and server /api
2023-10-16 23:11:33 +02:00
app.listen(PORT, function (err) {
if (err) console.log(err);
console.log(`http://localhost:${PORT}`);
});