nswbmw / koa-mongo

MongoDB middleware for koa, support connection pool.
145 stars 31 forks source link

using for generators instead of koa middleware #12

Closed rbosneag closed 8 years ago

rbosneag commented 8 years ago

Is it possible to use this library only for yield-ing calls to mongo instead of using it as a middleware in app.use()? I'd like to structure the app in a modularized way with db reuse and so on, not calling db directly in koa.

If so, can you give an example?

I'm new to koa/generators and trying to find a "generator-enabled" mongoDb module that is not an ODM (like mongoose or mongorito).