-
Konstantin Tsabolov authored
* Upgraded the dependencies to the latest versions * Switched output to ESM format * Switched NestJS and Jest to SWC to improve speed of building and testing * Refactored TSConfig to remove tsconfig-paths * Updated imports in all files to reflect the change in TSConfig * Changed the linting rules (removed AirBnB config) * Fixed Prettier installation (added ignore file) * Fixed typing errors (mainly usage of any's) * Fixed the non-working E2E test P.S. None of the mentioned makes sense alone, therefore a huge commit
Konstantin Tsabolov authored* Upgraded the dependencies to the latest versions * Switched output to ESM format * Switched NestJS and Jest to SWC to improve speed of building and testing * Refactored TSConfig to remove tsconfig-paths * Updated imports in all files to reflect the change in TSConfig * Changed the linting rules (removed AirBnB config) * Fixed Prettier installation (added ignore file) * Fixed typing errors (mainly usage of any's) * Fixed the non-working E2E test P.S. None of the mentioned makes sense alone, therefore a huge commit
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
app.module.ts 1.22 KiB
import {
MiddlewareConsumer,
Module,
NestModule,
RequestMethod,
} from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { APP_FILTER } from '@nestjs/core';
import { TerminusModule } from '@nestjs/terminus';
import ExceptionHandler from './common/exception.handler.js';
import config from './config/config.js';
import validationSchema from './config/validation.js';
import HealthController from './health/health.controller.js';
import { AuthMiddleware } from './middleware/auth.middleware.js';
import PresentationProofsModule from './presentationProof/module.js';
@Module({
imports: [
TerminusModule,
ConfigModule.forRoot({
isGlobal: true,
load: [config],
validationSchema,
}),
PresentationProofsModule,
],
controllers: [HealthController],
providers: [
{
provide: APP_FILTER,
useClass: ExceptionHandler,
},
],
})
export default class AppModule implements NestModule {
// eslint-disable-next-line class-methods-use-this
configure(consumer: MiddlewareConsumer) {
// eslint-disable-line
consumer
.apply(AuthMiddleware)
.exclude({
path: 'v1/health',
method: RequestMethod.GET,
})
.forRoutes('*');
}
}