I have a scaffold for Node + Koa (microframework) + Postgres + Twitter Bootstrap + Nunjucks (templating):
- Demo: https://koa-skeleton.danneu.com/
- Source: https://github.com/danneu/koa-skeleton
- Demo: https://koa-skeleton.danneu.com/
- Source: https://github.com/danneu/koa-skeleton
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)
})
})