This does not work:
app.use(async function () {
await something();
});
// AssertionError: app.use() requires a generator
While this works OK:
router.get('/', async function () {
await something();
});
Any reason for that?
You must be using Koa 1 - try npm install koa@next
.