import 'dotenv/config';
import { DataSource } from 'typeorm';
import { ConfigService } from '@nestjs/config';
import { buildDataSourceOptions } from './database.config';

const configService = new ConfigService(process.env);

export const AppDataSource = new DataSource(
  buildDataSourceOptions(configService),
);
