So I tried yielding to it with next, but the logger calls yield next() which then complains that next isn't a function. So I wrapped that too.
Am I missing something, or did this just not get updated from Koa 1.x yet? As it is, it works for me now and turns out to be less applicable than I thought to my particular project, but I figured I would open an issue to bring it to your attention anyway.
Hello!
I've been trying to get this to work in a fairly basic Koa app, and though I finally succeeded I had to make a hackish workaround to do so...
According to the example app and the README.md, this should work:
However I was getting an error:
So I browsed the source, did some googling, did some more source browsing and some tinkering which finally amounted to this:
It looks like the co.wrap() returns a promise? Console.log:
So I tried yielding to it with next, but the logger calls
yield next()
which then complains that next isn't a function. So I wrapped that too.Am I missing something, or did this just not get updated from Koa 1.x yet? As it is, it works for me now and turns out to be less applicable than I thought to my particular project, but I figured I would open an issue to bring it to your attention anyway.