4 ms·
Curious to see why you recommend Koa vs Express?. Looks simpler at first but if you can elaborate that would be great.
by pacomerh 11y ago
Curious to see why you recommend Koa vs Express?. Looks simpler at first but if you can elaborate that would be great.
- Killswitch 11y agoKoa is the successor of Express, written by Express creator, TJ. I like it because generator workflow makes writing apps better since we can yield promises. Code is much cleaner. app.get('/', function * () { this.body = yield User.all() }) vs app.get('/', function (req, res) { User.all(function (err, users) { if (err) throw err res.end(users) }) })