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.
18 lines
425 B
18 lines
425 B
const mysql = require('mysql2');
|
|
|
|
export default function Pool(
|
|
req: NextApiRequest,
|
|
res: NextApiResponse<Data>
|
|
) {
|
|
const pool = mysql.createPool({
|
|
host: process.env.HOST,
|
|
user: process.env.DATABASE,
|
|
database: process.env.DATABASE,
|
|
password: process.env.PASSWORD,
|
|
waitForConnections: true,
|
|
connectionLimit: 10,
|
|
queueLimit: 0
|
|
});
|
|
|
|
return pool;
|
|
}
|
|
|