diff --git a/docs/koa-vs-express.md b/docs/koa-vs-express.md index d549740..c54b359 100644 --- a/docs/koa-vs-express.md +++ b/docs/koa-vs-express.md @@ -3,8 +3,8 @@ THIS DOCUMENT IS IN PROGRESS. THIS PARAGRAPH SHALL BE REMOVED WHEN THIS DOCUMENT # Koa vs Express Philosophically, Koa aims to "fix and replace node", whereas Express "augments node". - Koa uses co to rid apps of callback hell and simplify error handling. - It exposes its own `this.request` and `this.response` objects instead of node's `req` and `res` objects. + Koa uses promises and async functions to rid apps of callback hell and simplify error handling. + It exposes its own `ctx.request` and `ctx.response` objects instead of node's `req` and `res` objects. Express, on the other hand, augments node's `req` and `res` objects with additional properties and methods and includes many other "framework" features, such as routing and templating, which Koa does not. @@ -57,8 +57,6 @@ THIS DOCUMENT IS IN PROGRESS. THIS PARAGRAPH SHALL BE REMOVED WHEN THIS DOCUMENT ### Generated-based control flow - Thanks to co. - No callback hell. Better error handling through try/catch.