Skip to content

Commit

Permalink
feat: add node_env validation valid var
Browse files Browse the repository at this point in the history
  • Loading branch information
stae1102 committed Mar 9, 2024
1 parent 731c3cd commit 8aa9e1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ import { InfraModule } from './infra/infra.module';
? '.env.dev'
: process.env.NODE_ENV === 'prod'
? '.env.prod'
: '.env.local',
: process.env.NODE_ENV === 'local'
? '.env.local'
: '.env.test',
validationSchema: Joi.object({
NODE_ENV: Joi.string().valid('dev', 'prod', 'local').required(),
NODE_ENV: Joi.string().valid('dev', 'prod', 'local', 'test').required(),
DB_HOST: Joi.string(),
DB_PORT: Joi.string(),
DB_USERNAME: Joi.string(),
Expand Down

0 comments on commit 8aa9e1e

Please sign in to comment.