Added error handler to web server.

This commit is contained in:
DebaucheryLibrarian
2021-02-26 19:39:48 +01:00
parent f018735052
commit 0eba0461c9
5 changed files with 55 additions and 1 deletions

View File

@@ -17,6 +17,7 @@ const PgOrderByRelatedPlugin = require('@graphile-contrib/pg-order-by-related');
const logger = require('../logger')(__filename);
const knex = require('../knex');
const { ActorPlugins, SitePlugins, ReleasePlugins } = require('./plugins/plugins');
const errorHandler = require('./error');
const {
fetchScene,
@@ -124,6 +125,7 @@ async function initServer() {
});
});
router.use(errorHandler);
app.use(router);
const server = app.listen(config.web.port, config.web.host, () => {