Skip to content

Latest commit

 

History

History
18 lines (9 loc) · 632 Bytes

File metadata and controls

18 lines (9 loc) · 632 Bytes

NodeJsBestPractices

This repo outlines best practices when developing in NodeJS.

I have provided the callConnectDB.js file that demonstrates how to use the connectDB.js file as promised!

connectDB.js demonstrates the following How To's:

How to centralize your database access to your NodeJs Application

How to create a wrapper function to fetch and persist data to your database

How to wrap your queries in rollback transactions without obscuring your code

How to commit your insert and update statements without obsuring your code

How to easily return the data retrieved from the database to your calling function