Skip to content

Commit

Permalink
Revert "Add config module validation"
Browse files Browse the repository at this point in the history
This reverts commit ef65baf.
  • Loading branch information
MrBartusek committed Apr 9, 2024
1 parent ef65baf commit 27f5ae1
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions apps/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import { RedisModule } from './redis/redis.module';
import { S3CacheModule } from './s3-cache/s3-cache.module';
import { S3Module } from './s3/s3.module';
import { SecurityModule } from './security/security.module';
import { ConfigModule } from '@nestjs/config';
import * as Joi from 'joi';

const FrontendModule = ServeStaticModule.forRoot({
rootPath: join(__dirname, '../..', 'client', 'dist'),
Expand All @@ -40,25 +38,6 @@ const FrontendModule = ServeStaticModule.forRoot({
delay: 500,
},
}),
ConfigModule.forRoot({
isGlobal: true,
validationSchema: Joi.object({
NODE_ENV: Joi.string().valid('development', 'production', 'test').default('development'),
PORT: Joi.number().port().default(3000),
BASE_API_URL: Joi.string().uri().default('http://localhost:3000/api'),
SESSION_SECRET: Joi.string().min(4).required(),
REDIS_HOST: Joi.string().default('localhost'),
REDIS_PASS: Joi.string().allow(''),
REDIS_PORT: Joi.number().port().default(6379),
MONGO_URL: Joi.string().uri().default('mongodb://127.0.0.1:27017/stockedUp'),
AWS_ACCESS_KEY_ID: Joi.string().required(),
AWS_SECRET_ACCESS_KEY: Joi.string().required(),
AWS_DEFAULT_REGION: Joi.string().required(),
AWS_BUCKET_NAME: Joi.string().required(),
RESEND_API_KEY: Joi.string().required(),
EMAIL_SENDER: Joi.string().email().default('[email protected]'),
}),
}),
FrontendModule,
ProductsModule,
WarehousesModule,
Expand Down

0 comments on commit 27f5ae1

Please sign in to comment.