How to use the config in main.ts?
See original GitHub issueI want to set app port using nestjs-config, how to use it in main.ts
?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
How to use config module on main.ts file - nestjs
I have set a config module, according to https://docs.nestjs.com/techniques/configuration then how can I use it on main.ts??
Read more >Configuration | NestJS - A progressive Node.js framework
Hint The ConfigService is imported from the @nestjs/config package. And use it in our class: // get an environment variable const dbUser =...
Read more >NestJS Config Module: Using environment variables - Tom Ray
Learn how to use environment variables (and other configuration values) in your NestJS projects with the Config Module.
Read more >Config File Setup In NestJs - Abiral Sthapit - Medium
“Config File Setup In NestJs” is published by Abiral Sthapit. ... app-config.controller.ts ... Importing Config in the Main src/main.ts
Read more >Loading Configuration Before Your Angular App Starts
Let this be DEV, STAGE and PROD for this case. What we NOT want to do is using the environment.stage.ts , environment.prod.ts ,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Specially for creating microservices, you would want to be able to configure host and port, this is how I did it
// config/config.ts
//main.ts
//app.modules.ts
[solved]