Closed ezhivitsa closed 5 years ago
@anorsich mongoose (and monk) have very interesting capabilities. We can create connection and immediately do requests to the database without waiting to establish the connection. This functionality realized through the special queue which store requests before the connection will be successfully established. Of course, we can write such code but I'm not sure that this is the right way.
You can read about this here.
Also, I thought about using some package for converting joi
to mongoose
schema (for example https://gist.github.com/stongo/6359042). But sometimes we need the schema itself for manipulation. for example, the correct way to create indexes in mongoose is using schema (https://mongoosejs.com/docs/guide.html#indexes)
Well, in memory Q is not difficult to implement. Is it the only magic we want to have? I would use this package for two main reasons:
@anorsich Please, review