Skip to content

Instantly share code, notes, and snippets.

@zzpzaf
Created January 23, 2022 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zzpzaf/7fc9bba6c294674b3fa355f44e7cc52e to your computer and use it in GitHub Desktop.
Save zzpzaf/7fc9bba6c294674b3fa355f44e7cc52e to your computer and use it in GitHub Desktop.
Unexpected behavior when getting a value from .env file for expireIn property - app.module.ts
import { Module } from '@nestjs/common';
import { UsersModule } from './users/users.module';
import { AuthModule } from './auth/auth.module';
import { ConfigModule } from '@nestjs/config';
@Module({
imports: [
UsersModule,
AuthModule,
ConfigModule.forRoot({
isGlobal: true,
envFilePath: [`.env.${process.env.STAGE}`],
}),
],
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment