// db.js
const mysql = require('mysql2/promise');

const pool = mysql.createPool({
  host: 'db',       // docker-compose 서비스명이 'db'라면 이렇게
  user: 'how2ice',
  password: 'tnals1459',
  database: 'mydb',
  waitForConnections: true,
  connectionLimit: 10,
  queueLimit: 0
});

module.exports = pool;