Intitial project structure with express.js

This commit is contained in:
2023-10-28 23:22:18 -04:00
parent fa67371b44
commit 092b7d8cc2
6 changed files with 812 additions and 0 deletions

19
index.js Normal file
View File

@ -0,0 +1,19 @@
const express = require('express');
const app = express();
const port = 3000;
// enable the Twig template engine
app.set('view engine', 'twig');
// enable serving static files
app.use(express.static('public'));
// load routes
const indexRoutes = require('./src/routes/index');
// register routes
app.get('/', indexRoutes.getIndex);
app.listen(port, () => {
console.log(`Leviathan listening on port ${port}`);
});