Nitpick, but isn't this service lookup disguised as injection? Also somewhat considered an anti-pattern by some. Although I'm not sure how 'real' DI would work in Node, since it's requires knowledge of types to inject.
Added a follow up blog entry here: <a href="https://vramework.io/blog/20211101-service-lookup-local-vs-cloud/" rel="nofollow">https://vramework.io/blog/20211101-service-lookup-local-vs-c...</a>
Can anyone explain how this is better than just importing a singleton instance where it's needed? I've never really understood the point of dependency injection.