hmil / rest.ts

Type safety across REST APIs in TypeScript!
MIT License
105 stars 6 forks source link

Revise readme #4

Closed hmil closed 5 years ago

hmil commented 5 years ago

Current readme may be a little confusing and doesn't even show how to bind the express router.

erikhofer commented 5 years ago

It would be helpful to write something about error handling in the router.

https://github.com/hmil/rest.ts/blob/27cc374bb564270cea8557e0329c401492467829/packages/rest-ts-express/src/index.ts#L99-L108

It's nice that you can simply throw exceptions in async handlers and they are forwarded to express error handlers. It is, however, not immediately obvious because this is not the case with vanilla express.