แก้connect db

This commit is contained in:
Kittapath 2024-02-05 16:57:04 +07:00
parent 15192f8f0d
commit c22d33fa60
3 changed files with 7 additions and 5 deletions

View file

@ -9,6 +9,7 @@ export const AppDataSource = new DataSource({
port: +(process.env.DB_PORT || 3306),
username: process.env.DB_USERNAME,
password: process.env.DB_PASSWORD,
connectorPackage: "mysql2",
synchronize: false,
logging: true,
entities:
@ -21,5 +22,6 @@ export const AppDataSource = new DataSource({
: ["dist/migration/**/*{.ts,.js}"],
subscribers: [],
});
// console.log(AppDataSource);
// export default database;