Skip to content

Commit 43e3f8d

Browse files
committed
docs: add JS version of functional middleware snippet
1 parent 1c1d18e commit 43e3f8d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

content/middlewares.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,11 @@ export function logger(req: Request, res: Response, next: Function) {
208208
console.log(`Request...`);
209209
next();
210210
};
211+
@@switch
212+
export function logger(req, res, next) {
213+
console.log(`Request...`);
214+
next();
215+
};
211216
```
212217

213218
And use it within the `AppModule`:

0 commit comments

Comments
 (0)