Configure remote database connection and update documentation
This commit is contained in:
3
backend/dist/config/typeorm.config.d.ts
vendored
Normal file
3
backend/dist/config/typeorm.config.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
export declare const getTypeOrmConfig: (configService: ConfigService) => TypeOrmModuleOptions;
|
17
backend/dist/config/typeorm.config.js
vendored
Normal file
17
backend/dist/config/typeorm.config.js
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getTypeOrmConfig = void 0;
|
||||
const getTypeOrmConfig = (configService) => ({
|
||||
type: 'postgres',
|
||||
host: configService.get('DATABASE_HOST') || 'localhost',
|
||||
port: configService.get('DATABASE_PORT') || 5432,
|
||||
username: configService.get('DATABASE_USERNAME') || 'postgres',
|
||||
password: configService.get('DATABASE_PASSWORD') || 'postgres',
|
||||
database: configService.get('DATABASE_NAME') || 'prism_messenger',
|
||||
entities: [__dirname + '/../**/*.entity{.ts,.js}'],
|
||||
migrations: [__dirname + '/../migrations/*{.ts,.js}'],
|
||||
synchronize: configService.get('NODE_ENV') !== 'production',
|
||||
logging: configService.get('NODE_ENV') !== 'production',
|
||||
});
|
||||
exports.getTypeOrmConfig = getTypeOrmConfig;
|
||||
//# sourceMappingURL=typeorm.config.js.map
|
1
backend/dist/config/typeorm.config.js.map
vendored
Normal file
1
backend/dist/config/typeorm.config.js.map
vendored
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"typeorm.config.js","sourceRoot":"","sources":["../../src/config/typeorm.config.ts"],"names":[],"mappings":";;;AAGO,MAAM,gBAAgB,GAAG,CAAC,aAA4B,EAAwB,EAAE,CAAC,CAAC;IACvF,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,WAAW;IACvD,IAAI,EAAE,aAAa,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,IAAI;IAChD,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,UAAU;IAC9D,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,mBAAmB,CAAC,IAAI,UAAU;IAC9D,QAAQ,EAAE,aAAa,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,iBAAiB;IACjE,QAAQ,EAAE,CAAC,SAAS,GAAG,0BAA0B,CAAC;IAClD,UAAU,EAAE,CAAC,SAAS,GAAG,2BAA2B,CAAC;IACrD,WAAW,EAAE,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,YAAY;IAC3D,OAAO,EAAE,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC,KAAK,YAAY;CACxD,CAAC,CAAC;AAXU,QAAA,gBAAgB,oBAW1B"}
|
Reference in New Issue
Block a user