Closed ickyrr closed 7 years ago
I just ran into this:
this.body = yield this.mongo.db('db').collection('col').find().toArray();
Without the .toArray()
, I got the following error:
TypeError: You may only yield a function, promise, generator, array, or object, but the following object was passed: "[object Object]"
Without the .toArray(), I got the following error:
TypeError: You may only yield a function, promise, generator, array, or object, but the following object was passed: "[object Object]" 。。。。。i just met this..
Hello, I'm new in KoaJS. I've been looking for a mongodb module, and I think this is a good one. Just need a little help, though. How can I retrieve multiple documents from mongo and display it? I'm using swig module for HTML template, koa router for routing (if this helps).
Thanks a lot.