Wednesday 18 December 2019

Structure & importing of database clients

Hey,I have a nodejs backend server, in which I am using various clients (firebase, bigquery, pubsub) - Right now I have a folder called `loaders` in which I initialise these clients and then import them into modules where they are needed.Is there a better way to do this? What are best practices for such a scenario?I have read about Dependency Injection but it mainly focuses on classes - I am steering clear of OO

Submitted December 18, 2019 at 09:11AM by ydennisy

No comments:

Post a Comment