News for hackers. Stuff that matters.
Re:Why and how to use service injection in Node.js by pumpkinman on Sunday October 31, 2021 @12:18PM (#29058055)
It's not. But it makes you look smart, and helps you justify your salary to other engineers.

Management don't give a toss, as long as you deliver value (features and fixes) on time.

Re:Why and how to use service injection in Node.js by dimgl on Sunday October 31, 2021 @12:34PM (#29058182)
This is not necessarily true. Dependency injection allows you to provide your own implementations for unit testing. I'm surprised we're still talking about dependency injection in Node.js. I made a really crude dependency injection library for Node six years ago.

https://github.com/divmgl/nwire

Re:Why and how to use service injection in Node.js by pumpkinman on Sunday October 31, 2021 @07:43PM (#29061581)
But you can just mock the singleton