import mysql from 'mysql2/promise'

const pool = mysql.createPool({
  host: process.env.DB_HOST || 'localhost',
  user: process.env.DB_USER || 'iyjm',
  password: process.env.DB_PASSWORD || '',
  database: process.env.DB_NAME || 'iyjm',
  waitForConnections: true,
  connectionLimit: 10,
})

export { pool }
