Created
March 21, 2021 21:02
-
-
Save kerren/44b12190e3828c0a88fd3c74bb41375a to your computer and use it in GitHub Desktop.
[Current NestJS Config] The suggested process in the NestJS docs #current #suggested #config #nestjs
This file contains hidden or 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
| interface DatabaseConfig { | |
| host: string; | |
| port: number; | |
| } | |
| const dbConfig = this.configService.get<DatabaseConfig>('database'); | |
| // you can now use `dbConfig.port` and `dbConfig.host` | |
| const port = dbConfig.port; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment