You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
333 B
11 lines
333 B
5 months ago
|
import { Injectable, NestMiddleware } from '@nestjs/common';
|
||
|
import { Request, Response, NextFunction } from 'express';
|
||
|
|
||
|
@Injectable()
|
||
|
export class LoggerMiddleware implements NestMiddleware {
|
||
|
use(req: Request, res: Response, next: NextFunction) {
|
||
|
console.log(`[LOG] - Request: ${JSON.stringify(req.body)}`);
|
||
|
next();
|
||
|
}
|
||
|
}
|