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.
10 lines
333 B
10 lines
333 B
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();
|
|
}
|
|
}
|
|
|