const mysql = require("mysql2");


if (process.env.NODE_ENV !== "production") {
    require("dotenv").config();
  }
  
  // const db = mysql.createConnection({
  //   host: "localhost",
  //   user: "nodeftvnailstudi_master",
  //   password: "A?^CeJLoG%(,",
  //   database: "nodeftvnailstudi_api",
  // });

  const db = mysql.createConnection({
    host: "localhost",
    user: "root",
    password: "",
    database: "test",
  });

  db.connect((err) => {
    if (err) {
      throw err;
    } else {
      console.log("MYSQL Connected Successfully");
    }
  });
  module.exports = db;