Skip to content

Commit

Permalink
feat: add database configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
gurug-prog committed Dec 15, 2021
1 parent 1996033 commit caf333e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/js/dbconf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const { Sequelize } = require('sequelize');

const MYSQL_HOST = process.env.MYSQL_HOST || "localhost";
const MYSQL_PORT = process.env.MYSQL_PORT || 3306;
const MYSQL_USER = process.env.MYSQL_USER || "root";
const MYSQL_PASS = process.env.MYSQL_PASS || "qwerty123";
const MYSQL_DB = process.env.MYSQL_DB || "proj-control";

module.exports = new Sequelize(MYSQL_DB, MYSQL_USER, MYSQL_PASS, {
host: MYSQL_HOST,
port: MYSQL_PORT,
dialect: "mysql",
logging: false,
});

0 comments on commit caf333e

Please sign in to comment.