News for hackers. Stuff that matters.
Re:Why and how to use service injection in Node.js by yasserf on Monday November 01, 2021 @02:11AM (#29063500)
So vramework tries to avoid using OO paradigms except for services. The thing I don't really understand about functions and long lived aspects (like a database connection for example) is that if you don't encapsulate it within a class, you end up with it being on the global scope, which in some way effectively treats the global scope as your class.

How would you for example deal with having a single database pool that doesn't automatically connect on startup (when requiring a class)?

There are no comments on this comment yet.