DEV Community

Cover image for Express.js With Typescript Decorators in Examples
Artem Diashkin
Artem Diashkin

Posted on • Originally published at Medium

Express.js With Typescript Decorators in Examples

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)

Collapse
 
alfredosalzillo profile image
Alfredo Salzillo

It's only a link to another article.

Collapse
 
nemrosim profile image
Artem Diashkin • Edited

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

Collapse
 
avantar profile image
Krzysztof Szala

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 :)