Skip to content

Commit

Permalink
Feature/fix db connection (#5)
Browse files Browse the repository at this point in the history
* use dialectOptions

* restructure ssl dialectoptions

* add ','

* set ssl as object
  • Loading branch information
IanR01 authored May 23, 2024
1 parent 51f9704 commit 813b5bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { Sequelize } = require('sequelize');

var getAzureAuthToken = require('./azure-auth')

let ssl;
let ssl = {};

if (process.env.MYSQL_CA_CERT) {
ssl.ca = process.env.MYSQL_CA_CERT;
Expand Down Expand Up @@ -35,7 +35,7 @@ let sequelize = new Sequelize({
dialect: process.env.DB_DIALECT || 'mysql',
dialectOptions: {
ssl
}
},

logging: null,
// logging: console.log,
Expand Down

0 comments on commit 813b5bc

Please sign in to comment.