
22 Buzz Words Explained — Mutations, Pure Functions , Serverless, Hoisting, MVC + More
Syntax - Tasty Web Development Treats
00:00
Is There a Singleton in NPM?
The idea behind a singleton is that when you have some sort of package and you need to configure it like connecting to a database You just configure it in one of your files. And then if you were then to require that package anywhere else in your application It would already be set up. This is really only ever Good pattern for when you absolutely only ever need one of those in your application and you don't need multiple A router might be another good example of a singleton where your your application will only ever have one router So you set that thing up in one file and then anytime that you require That router package from NPM it's going to be already set up.
Play episode from 12:55
Transcript


