import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { createDatabaseConfig } from '../config/database.config';

@Module({
  imports: [
    TypeOrmModule.forRootAsync({
      useFactory: () => createDatabaseConfig(process.env.DATABASE_URL ?? ''),
    }),
  ],
})
export class DatabaseModule {}
