I have Node.js app with MongoDB. It is separated to many small modules.
What is the best pattern of DB module? I can export DB instance, but i can't be sure that we are already connected to DB. This is a bad option, when we each module will create a new connection.
Aucun commentaire:
Enregistrer un commentaire