Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { RouterModule } from 'nest-router';
import { AWSModule } from './aws/aws.module';
import { BaseModule } from './base/base.module';
import { CommonModule } from './common/common.module';
import { ExceptionsFilter } from './common/filters';
import { AuthenticatedGuard } from './common/guards';
import { LoggerMiddleware } from './common/middleware';
import { configuration } from './config';
import { SampleModule } from './sample/sample.module';
@Module({
imports: [
// Configuration
// https://docs.nestjs.com/techniques/configuration
ConfigModule.forRoot({
isGlobal: true,
load: [configuration]
}),
// Database
// https://docs.nestjs.com/techniques/database
TypeOrmModule.forRootAsync({
useFactory: async (config: ConfigService) => ({
entities: [`${__dirname}/entity/**/*.{js,ts}`],
subscribers: [`${__dirname}/subscriber/**/*.{js,ts}`],
migrations: [`${__dirname}/migration/**/*.{js,ts}`],
...config.get('db')
}),
inject: [ConfigService]
}),
// Static Folder
// https://docs.nestjs.com/recipes/serve-static