generator-api
generator-api copied to clipboard
Add example of facade use case
As stated in #38 an example of the facade use cases would be helpful.
the facade pattern is designed to be a wrapper around mongoose, so all things related to the DB like populating, querying, sorting mongoose docs should be here, note that you can reference other models from each model if necessary. I will update the example project to have some descriptive facade methods.
I am new to Facade and Mongoose. Would you give me a code sample of how to validate a collection before creating it?