Let’s take a look at how we can make our Express.js Server code cleaner with using Typescript Decorators.
What will be covered in this story:
- Prerequisites. Creating Express Typescript project
- Wrapping Express API Route with Typescript Method Decorator
- Async Method Decorator
- Adding Logging Decorator
- Adding Authentication Decorator
- Codesandbox Playground
https://medium.com/geekculture/express-js-with-typescript-decorators-in-examples-5f82223159c1
Top comments (3)
It's only a link to another article.
Yes, correct. I didn't want to copy/paste entire article (they would be identical). This is my first steps in dev.to. If there are some rules about references to medium I would be glad to read about them. Thank you
To be honest, it's a little bit unfair to the dev.to users, especially that medium has (at some point) the paywall. Just copy your article IMO :)