Skip to content

Commit b3e291b

Browse files
committed
Added comments on connection functions.
1 parent c6bf658 commit b3e291b

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

model/mongoose-connect.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const mongoose = require('mongoose');
22
const { services } = require('../user/settings.json');
33

4+
// Mongoose connection wrapped in function that takes the index of the selected database as the parameter. This index is used to target the correct database for querying.
45
const connectMongoose = (i) => {
56
const URI = services[i][2];
67
return mongoose.connect(URI, { useNewUrlParser: true, useUnifiedTopology: true }, (err) => {

model/sql-connect.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const { Pool } = require('pg');
22
const { services } = require('../user/settings.json');
33

4+
// SQL connection wrapped in function that takes the index of the selected database as the parameter. This index is used to target the correct database for querying.
45
const connectSQL = (i) => {
56
const URI = services[i][2];
67
return new Pool({

0 commit comments

Comments
 (0)