From 25ae6e9fa707ef9d1e848017956eac307b4eea69 Mon Sep 17 00:00:00 2001 From: Roshan Paudel Date: Sat, 12 Oct 2024 17:21:35 +0545 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20logs=20only=20for=20d?= =?UTF-8?q?evelopment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/index.ts b/src/app/index.ts index c6e4973..066ae1a 100644 --- a/src/app/index.ts +++ b/src/app/index.ts @@ -35,16 +35,16 @@ export class App { } private setRoutes() { - this.app.use('*', (req, res, next) => { - console.log('BODY', req.body); - console.log('QUERY', req.query); - next(); - }); this.app.use('/user', userRoutes); this.app.use('/auth', authRoutes); this.app.use('/otp', otpRoutes); if (process.env.ENV === 'development') { + this.app.use('*', (req, res, next) => { + console.log('BODY', req.body); + console.log('QUERY', req.query); + next(); + }); this.app.use('/docs', swaggerUi.serve, swaggerUi.setup(swaggerConfig)); } }