Closed DavidBernal closed 2 years ago
Which package version are you on?
Well, the problem is the documentation is outdated. With custom middleware works.
@DavidBernal you are right, documentation on the website is very old and I removed the link to it in the repository. I actually wrote mongorito-hooks
module specifically for this purpose, but haven't released it yet.
@vadimdemedes nice, I love mongorito but is a little hard with the current documentation
@DavidBernal Could you point out what's confusing so that's everyone can improve it? Talking about the current readme, where all docs reside.
@vadimdemedes For example, I don't know how to create index for a collection. I see createIndex
function in src, but is it not in documentation. Me neither I don't know how to do a search in collection before create new document.
Re indexes, you are right, it's not documented yet. Here's how to use it until then: https://github.com/vadimdemedes/mongorito/blob/master/test/indexes.js#L12.
As for the search, it's no longer supported in the core, but supposed to be implemented in a 3rd-party plugin.
I'm following the examples to abort save but doesn't work in node v8.0.0. I also test with —harmony param but nothing.
The example is in bottom: http://mongorito.com/guides/middleware/
Any help is welcome.