const mysql = require("mysql2");

const connection = mysql.createConnection({
  host: "localhost",
  user: "root",
  password: "hype",
  database: "recipes_db",
  port: 3306,
});

connection.connect((err) => {
  if (err) {
    console.log("Error connecting to the database", err);
  } else {
    console.log("Successfully connected to the database.");
  }
});

module.exports = connection;
