|
|
|
|
|
by Killswitch
3825 days ago
|
|
Koa 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)
})
})
|
|