Saturday, 10 December 2016

Opinions on Koa 2 vs express "req" and "res" handling

I've used Koa 1 for a few small projects forever ago and have used express since. I was specifically wondering how users of both feel about ambiguity around "this.body" pointing to the response (or is it request? I can't remember - case in point) body whereas in express with explicit req/res objects, there is no ambiguity in when you are dealing with the request or the response.Is the Koa equivalent to always explicitly refer to "this.req" and "this.res" when processing either (in order to avoid ambiguity)

Submitted December 10, 2016 at 11:46PM by SomeRandomBuddy

No comments:

Post a Comment