Organisation

This commit is contained in:
Fred Boniface 2022-12-01 13:55:42 +00:00
parent 53b7909910
commit b4bd795b3a

4
app.js
View File

@ -14,9 +14,11 @@ const listRtr = require('./src/routes/list.routes');
// Print version number:
console.log(`Starting OwlBoard, API version ${version.api}`);
// Middleware:
// Submodules:
app.use(express.json()); //JSON Parsing for POST Requests
app.use(express.static('static')); //Serve static content from static
// Error Handling:
app.use((err, req, res, next) => {
const statusCode = err.statuscode || 500;
console.error(err.message, err.stack);