2024-06-30 06:09:44 +00:00
|
|
|
import configuration from '@/config/index';
|
|
|
|
import { Module } from '@nestjs/common';
|
|
|
|
import { ConfigModule } from '@nestjs/config';
|
|
|
|
import Joi from 'joi';
|
|
|
|
|
|
|
|
import { AuthModule } from './modules/auth/auth.module';
|
|
|
|
import { HealthModule } from './modules/health/health.module';
|
2024-06-30 07:03:37 +00:00
|
|
|
import { MenuModule } from './modules/menu/menu.module';
|
2024-06-30 14:28:35 +00:00
|
|
|
import { MockModule } from './modules/mock/mock.module';
|
2024-06-30 06:09:44 +00:00
|
|
|
import { UsersModule } from './modules/users/users.module';
|
|
|
|
|
|
|
|
@Module({
|
|
|
|
imports: [
|
|
|
|
ConfigModule.forRoot({
|
|
|
|
cache: true,
|
|
|
|
isGlobal: true,
|
|
|
|
load: [configuration],
|
|
|
|
validationOptions: {
|
|
|
|
abortEarly: true,
|
|
|
|
allowUnknown: true,
|
|
|
|
},
|
|
|
|
validationSchema: Joi.object({
|
|
|
|
NODE_ENV: Joi.string().valid('development', 'production', 'test'),
|
|
|
|
port: Joi.number(),
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
HealthModule,
|
|
|
|
AuthModule,
|
|
|
|
UsersModule,
|
2024-06-30 07:03:37 +00:00
|
|
|
MenuModule,
|
2024-06-30 14:28:35 +00:00
|
|
|
MockModule,
|
2024-06-30 06:09:44 +00:00
|
|
|
],
|
|
|
|
})
|
|
|
|
export class AppModule {}
|