chatbridge/server/db/data-source.ts
ansible user/allowed to read system logs 22340d8a96 working group controller
2023-07-24 18:40:22 -07:00

22 lines
589 B
TypeScript

require('dotenv').config();
import 'reflect-metadata';
import { DataSource } from 'typeorm';
import config from 'config';
const postgresConfig = config.get<{
host: string;
port: number;
username: string;
password: string;
database: string;
}>('postgresConfig');
export const AppDataSource = new DataSource({
...postgresConfig,
type: 'postgres',
synchronize: true,
logging: false,
entities: ['server/entities/**/*.entity{.ts,.js}'],
migrations: ['server/migrations/**/*{.ts,.js}'],
// subscribers: ['server/subscribers/**/*{.ts,.js}'],
});