Skip to content

Commit

Permalink
fix: ajust environments
Browse files Browse the repository at this point in the history
  • Loading branch information
William Koller committed Apr 27, 2022
1 parent 5ea06e8 commit 058e3a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/config/environments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type EnvironmentType = {
defaultStrategy: string;
property: string;
session: string;
mongoUrl: string;
mongoUri: string;
redisHost: string;
redisPort: number;
redisAuthPass: string;
Expand All @@ -23,7 +23,7 @@ export const environments = (): EnvironmentType => {
defaultStrategy: process.env.DEFAULT_STRATEGY,
property: process.env.PROPERTY_USER,
session: process.env.SESSION,
mongoUrl: process.env.MONGODB_URL,
mongoUri: process.env.MONGODB_URI,
redisHost: process.env.REDIS_HOST,
redisPort: Number(process.env.REDIS_PORT),
redisAuthPass: process.env.REDIS_AUTH_PASS,
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function bootstrap() {
swagger(app);

const config = app.get<ConfigService>(ConfigService);
const port = config.get<string>('port');
const port = config.get<string>('port') ?? 3000;
const nodeEnv = config.get<string>('nodeEnv');

await app.listen(port, () =>
Expand Down
2 changes: 1 addition & 1 deletion src/modules/app/app.settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const imports = [
imports: [ConfigModule],
inject: [ConfigService],
useFactory: async (config: ConfigService) => ({
uri: config.get('mongoUrl'),
uri: config.get<string>('mongoUri'),
}),
}),
ScheduleModule.forRoot(),
Expand Down

0 comments on commit 058e3a6

Please sign in to comment.