Skip to content

Commit

Permalink
fix:removed type property from package.json and instiated Joi in app.…
Browse files Browse the repository at this point in the history
…module
  • Loading branch information
urizennnn committed Feb 26, 2025
1 parent fa01e26 commit c251b96
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "hng_boilerplate_nestjs",
"type": "module",
"version": "0.0.1",
"description": "",
"author": "",
Expand Down
10 changes: 5 additions & 5 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Module, ValidationPipe } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { object, string, number } from 'joi';
import * as Joi from 'joi';
import { LoggerModule } from 'nestjs-pino';
import authConfig from '@config/auth.config';
import serverConfig from '@config/server.config';
Expand Down Expand Up @@ -83,10 +83,10 @@ import { ApiStatusModule } from '@modules/api-status/api-status.module';
envFilePath: ['.env.development.local', `.env.${process.env.PROFILE}`],
isGlobal: true,
load: [serverConfig, authConfig],
validationSchema: object({
NODE_ENV: string().valid('development', 'production', 'test', 'provision').required(),
PROFILE: string().valid('local', 'development', 'production', 'ci', 'testing', 'staging').required(),
PORT: number().required(),
validationSchema: Joi.object({
NODE_ENV: Joi.string().valid('development', 'production', 'test', 'provision').required(),
PROFILE: Joi.string().valid('local', 'development', 'production', 'ci', 'testing', 'staging').required(),
PORT: Joi.number().required(),
}),
}),
LoggerModule.forRoot(),
Expand Down
1 change: 1 addition & 0 deletions src/modules/organisations/organisations.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { Role } from '@modules/role/entities/role.entity';
import { Profile } from '@modules/profile/entities/profile.entity';
import { UserModule } from '@modules/user/user.module';
import { InviteModule } from '@modules/invite/invite.module';
import { Permissions } from '@modules/permissions/entities/permissions.entity';

@Module({
imports: [
Expand Down
1 change: 1 addition & 0 deletions src/modules/role/role.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Role } from './entities/role.entity';
import { User } from '@modules/user/entities/user.entity';
import { DefaultPermissions } from '@modules/permissions/entities/default-permissions.entity';
import { Organisation } from '@modules/organisations/entities/organisations.entity';
import { Permissions } from '@modules/permissions/entities/permissions.entity';

@Module({
imports: [
Expand Down

0 comments on commit c251b96

Please sign in to comment.