From 6f5f9311a260a23dd483d05d965f58b3aa257756 Mon Sep 17 00:00:00 2001 From: Myrotvorets Date: Wed, 20 Mar 2024 21:14:39 +0200 Subject: [PATCH] More refactoring --- src/server.mts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/server.mts b/src/server.mts index e328e8f4..3f53dc6b 100644 --- a/src/server.mts +++ b/src/server.mts @@ -5,12 +5,13 @@ import { installOpenApiValidator } from '@myrotvorets/oav-installer'; import { errorMiddleware, notFoundMiddleware } from '@myrotvorets/express-microservice-middlewares'; import { createServer, getTracer, recordErrorToSpan } from '@myrotvorets/otel-utils'; import { - LoggerFromRequestFunction, + type LoggerFromRequestFunction, + errorLoggerHook, requestDurationMiddleware, requestLoggerMiddleware, } from '@myrotvorets/express-otel-middlewares'; -import { LocalsWithContainer, initializeContainer, scopedContainerMiddleware } from './lib/container.mjs'; +import { type LocalsWithContainer, initializeContainer, scopedContainerMiddleware } from './lib/container.mjs'; import { searchController } from './controllers/search.mjs'; import { monitoringController } from './controllers/monitoring.mjs'; @@ -38,7 +39,9 @@ export function configureApp(app: Express): ReturnType