import { Module } from '@nestjs/common'; import { ServeStaticModule } from '@nestjs/serve-static'; import { ThrottlerModule } from '@nestjs/throttler'; import { join } from 'path'; import { AppController } from './app.controller'; import { AppService } from './app.service'; import { CSRFMiddleware } from './middleware/csrf.middleware'; import { ApiModule } from './modules/api/api.module'; import { ConfigurationModule } from './modules/config/config.module'; import { JWTModule } from './modules/jwt/jwt.module'; import { SSRFrontEndModule } from './modules/ssr-front-end/ssr-front-end.module'; import { UtilityModule } from './modules/utility/utility.module'; import { WellKnownModule } from './modules/well-known/well-known.module'; @Module({ imports: [ ServeStaticModule.forRoot({ rootPath: join(__dirname, '..', 'uploads'), serveRoot: '/uploads', serveStaticOptions: { cacheControl: true, maxAge: 8 * 60 * 60 * 1000, }, }), ThrottlerModule.forRoot([ { ttl: 10000, limit: 10, }, ]), ConfigurationModule, UtilityModule, JWTModule, SSRFrontEndModule, WellKnownModule, ApiModule, ], controllers: [AppController], providers: [AppService, CSRFMiddleware], }) export class AppModule {}