You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
436 B
20 lines
436 B
const mysql = require("mysql");
|
|
|
|
const connection = mysql.createPool({
|
|
host: process.env.DB_HOST,
|
|
user: process.env.DB_USER,
|
|
password: process.env.DB_PASSWORD,
|
|
database: process.env.DB_NAME
|
|
});
|
|
|
|
/*
|
|
connection.connect((err) => {
|
|
if (err) {
|
|
console.error('Error connecting to the database:', err);
|
|
return;
|
|
}
|
|
console.log('Connected to the MySQL database');
|
|
});
|
|
*/
|
|
|
|
module.exports = connection; |