Check mongoDB service getDb method to see singleton pattern illustrated.
Check model/Order to see an implementation of a ConcreteBuilder
! No Builder interface, since there are no interfaces in JS
! No Director implemented, since it's optional. Check usage in routes/orders, can be seen as Director
Check decorators in model directory
They are built in different ways, so that you can compare different approaches
https://addyosmani.com/blog/decorator-pattern/
mongoDbService over database operations
Middlewares for ExpressJS https://expressjs.com/en/guide/using-middleware.html Check server.js file
Check orderManager and foodDbService for implementation Check routes/orders for usage
Check utils/iterator, an iterator implemented with generator functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators