I am writing a Node application that accepts TCP connections. I have several separate Node modules (using export functions). Each of them requires a database connection.
What is the best way to architect / handle database connections? Should each module create a separate connection, or should my main JS file go through the handler for connecting the database to the modules when I require them?
source share