Organisation
This commit is contained in:
parent
53b7909910
commit
b4bd795b3a
4
app.js
4
app.js
@ -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);
|
||||
|
Reference in New Issue
Block a user