typescript-rest
typescript-rest copied to clipboard
Why specify route method?
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.