19 lines
441 B
TypeScript
19 lines
441 B
TypeScript
|
import { createConnection } from 'typeorm';
|
||
|
|
||
|
export const databaseProviders = [
|
||
|
{
|
||
|
provide: 'DATABASE_CONNECTION',
|
||
|
useFactory: async () =>
|
||
|
await createConnection({
|
||
|
type: 'mysql',
|
||
|
host: 'localhost',
|
||
|
port: 3306,
|
||
|
username: 'icyauth',
|
||
|
password: 'icyauth',
|
||
|
database: 'icyauth',
|
||
|
entities: [__dirname + '/../**/*.entity{.ts,.js}'],
|
||
|
synchronize: true,
|
||
|
}),
|
||
|
},
|
||
|
];
|