import { Sequelize } from "sequelize";

const sequelize = new Sequelize(
  //   {
  //     host: process.env.DB_HOST,
  //     username:process.env.DB_USER, // username
  //     password:process.env.DB_PASSWORD, // password
  //     database:process.env.DB_NAME, // dbname
  //     port:process.env.DB_PORT,
  //     dialect: "mysql",
  //     dialectModule:require('mysql2')
  //   }

  process.env.DB_NAME, // dbname
  process.env.DB_USER, // username
  process.env.DB_PASSWORD, // password
  {
    host: process.env.DB_HOST,
    dialect: "mysql",
    dialectModule: require("mysql2"),
  }
);

export default sequelize;
