File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ import { config as configDev } from './config/config.development' ;
2+ import { config as configProd } from './config/config.production' ;
3+
4+ let config ;
5+
6+ if ( process . env . NODE_ENV === 'production' ) {
7+ config = configProd ;
8+ } else {
9+ config = configDev ;
10+ }
11+
12+ export default config ;
Original file line number Diff line number Diff line change 1+ import { Injectable } from '@nestjs/common' ;
2+ import { SequelizeOrmConfig } from './interfaces/sequelize-orm-config.interface' ;
3+ import { JwtConfig } from './interfaces/jwt-config.interface' ;
4+ import config from '../../../config' ;
5+
6+ @Injectable ( )
7+ export class ConfigService {
8+ get sequelizeOrmConfig ( ) : SequelizeOrmConfig {
9+ return config . database ;
10+ }
11+
12+ get jwtConfig ( ) : JwtConfig {
13+ return {
14+ privateKey : config . jwtPrivateKey ,
15+ } ;
16+ }
17+ }
You can’t perform that action at this time.
0 commit comments