Last active
September 13, 2023 06:19
-
-
Save tomerslice/49e523846129dc8e88a5aa28d536fc4f to your computer and use it in GitHub Desktop.
Infer with default value
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = await NestFactory.create(AppModule); | |
const configService = app.get(ConfigService<{ PORT?: number; }>); | |
const port = configService.get('PORT', 8080, { infer: true }); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment