thiagobustamante / typescript-rest

This is a lightweight annotation-based expressjs extension for typescript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why specify route method?

Evanlec opened this issue · comments

The standard Express syntax already specifies the HTTP method...
i.e.
router.get('/foo', () => { ... })

Can't we introspect the HTTP method (in this case GET) from the code, rather than using this @GET annotation?

This way we're writing code that is closer to vanilla Express.