Coding task · NestJS course · Module 1: NestJS Basics
ConfigModule and ConfigService
Configure ConfigModule and use ConfigService to read variables.
Task
Register ConfigModule.forRoot({ isGlobal: true }) in the imports of AppModule and write a DatabaseService that receives ConfigService through the constructor and returns this.configService.get('DB_HOST') from a getHost() method.