Put in order · NestJS course · Module 1: NestJS Basics

Reading an Environment Variable

Arrange the elements for reading an environment variable via ConfigService:

Items to put in order

  • .get
  • ('DB_HOST')
  • this.configService
Show the answer

Correct order:

  1. this.configService
  2. .get
  3. ('DB_HOST')