-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.module.ts
27 lines (26 loc) · 856 Bytes
/
app.module.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { CommonModule } from './common/common.module';
import { ConfigModule } from '@nestjs/config';
import { EnvConfig } from './config/env.config';
import { JoiValidationSchema } from './config/joi.validation';
import { Module } from '@nestjs/common';
import { MongooseModule } from '@nestjs/mongoose';
import { PokemonModule } from './pokemon/pokemon.module';
import { SeedModule } from './seed/seed.module';
import { ServeStaticModule } from '@nestjs/serve-static';
import { join } from 'path';
@Module({
imports: [
ConfigModule.forRoot({
load: [EnvConfig],
validationSchema: JoiValidationSchema,
}),
ServeStaticModule.forRoot({
rootPath: join(__dirname, '..', 'client'),
}),
MongooseModule.forRoot(process.env.MONGO_URI),
PokemonModule,
CommonModule,
SeedModule,
],
})
export class AppModule {}