CLASS 06
REVIEW, RESEARCH AND DISCUSS
WHAT’S A SINGLETON?
- Singleton is a class that allows only a single instance of itself to be created and gives access to that created instance.
Explain how the Singleton pattern can be used with Node modules, specifically with classes
- Can be used to make sure that you have one and only one instance of an object.
### TERMS:
Router Middleware
Is a function that has route information and used as a called callback between request and response.
Singleton Pattern
Its a design pattern that restricts the instantiation of a class to one “single” instance.
Mock testing
Means creating a fake version of an external or internal service that can stand in for the real one.
CRUD REST
Create ————–> PUT
Create ————–> POST
Read ————–> GET
Update ————–> PUT
Delete ————–> DELETE