Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.18 KB

README.md

File metadata and controls

34 lines (26 loc) · 1.18 KB

food-delivery

Singleton

Check mongoDB service getDb method to see singleton pattern illustrated.

Builder

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

Decorator

Check decorators in model directory
They are built in different ways, so that you can compare different approaches
https://addyosmani.com/blog/decorator-pattern/

Facade

mongoDbService over database operations

Chain of responsibility

Middlewares for ExpressJS https://expressjs.com/en/guide/using-middleware.html Check server.js file

Command

Check orderManager and foodDbService for implementation Check routes/orders for usage

Iterator

Check utils/iterator, an iterator implemented with generator functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators

Requirements to run the app