Authentication
- Explain what a “Singleton” is (in Computer Science terms)
A 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
Not sure, maybe by using consts? or maybe by creating an object from a class and then just using that?
- If you were tasked with building a middleware system like Express uses, what approach might you take to construct/operate it?
That’s a hard question that I don’t think I’m at a level that can answer it, but maybe make the get
and post
and other http methods in express be function that can take as many callbacks(middleware) as you want? and then run that each time this method gets called?