"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.databaseConfig = void 0;
const databaseConfig = (configService) => ({
    type: 'postgres',
    host: configService.get('database.host'),
    port: configService.get('database.port'),
    database: configService.get('database.name'),
    username: configService.get('database.user'),
    password: configService.get('database.password'),
    entities: [__dirname + '/../**/*.entity{.ts,.js}'],
    synchronize: false,
    logging: configService.get('nodeEnv') === 'development',
    ssl: configService.get('nodeEnv') === 'production'
        ? { rejectUnauthorized: false }
        : false,
});
exports.databaseConfig = databaseConfig;
//# sourceMappingURL=database.config.js.map