From 0732915bdd3f863d53f175c36e0a297df4a04bfe Mon Sep 17 00:00:00 2001 From: mzrtamp Date: Thu, 7 Mar 2024 13:54:30 +0700 Subject: [PATCH] chore: migrate credentials to dotenv file --- src/index.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index c3556d4..ce26bf2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,10 +2,10 @@ import { Sequelize } from "sequelize"; const client = new Sequelize({ dialect: "mariadb", - port: 3306, - host: "localhost", - username: "root", - password: "youshallnotpass" + host: process.env.DB_HOST || "localhost", + port: parseInt(process.env.DB_PORT || "3306"), + username: process.env.DB_USERNAME || "root", + password: process.env.DB_PASSWORD || "youshallnotpass", }); export default client;