mirror of
https://github.com/dadosfera/maestro.git
synced 2026-09-15 15:24:48 +00:00
90 lines
2.9 KiB
TypeScript
90 lines
2.9 KiB
TypeScript
import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common';
|
|
import { ClientsModule } from '@nestjs/microservices';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
|
|
import { LoggerMiddleware } from './middlewares/authentication';
|
|
|
|
// import { InputsController } from './modules/inputs/inputs.controller';
|
|
// import { TransformationsController } from './modules/transformations/transformations.controller';
|
|
// import { OutputsController } from './modules/outputs/outputs.controllers';
|
|
// import { PipelinesController } from './modules/pipelines/pipelines.controller';
|
|
import { AuthController } from './modules/auth/auth.controller';
|
|
|
|
import { InputsService } from './modules/inputs/inputs.service';
|
|
import { TransformationsService } from './modules/transformations/transformations.service';
|
|
import { OutputsService } from './modules/outputs/outputs.service';
|
|
// import { PipelinesService } from './modules/pipelines/pipelines.service';
|
|
// import { AuthService } from './modules/auth/auth.service';
|
|
|
|
// import { InputsClientService } from './clients/inputs/client.service';
|
|
// import { TransformationsClientService } from './clients/transformations/client.service';
|
|
// import { OutputsClientService } from './clients/outputs/client.service';
|
|
// import { PipelinesClientService } from './clients/pipelines/client.service';
|
|
import { AuthClientService } from './clients/auth/client.service';
|
|
|
|
// import { InputsClientConfiguration } from './clients/inputs/client.config';
|
|
// import { OutputsClientConfiguration } from './clients/outputs/client.config';
|
|
// import { TransformationsClientConfiguration } from './clients/transformations/client.config';
|
|
import { AuthClient } from './clients/auth/client.config';
|
|
|
|
const authClient = new AuthClient();
|
|
|
|
@Module({
|
|
controllers: [
|
|
// InputsController,
|
|
// TransformationsController,
|
|
// OutputsController,
|
|
// PipelinesController,
|
|
AuthController,
|
|
],
|
|
providers: [
|
|
InputsService,
|
|
TransformationsService,
|
|
OutputsService,
|
|
// PipelinesService,
|
|
// AuthService,
|
|
// InputsClientService,
|
|
// TransformationsClientService,
|
|
// OutputsClientService,
|
|
// PipelinesClientService,
|
|
AuthClientService,
|
|
],
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
isGlobal: true,
|
|
}),
|
|
|
|
ClientsModule.register([
|
|
// {
|
|
// name: 'INPUTS_PACKAGE',
|
|
// ...InputsClientConfiguration,
|
|
// },
|
|
|
|
// {
|
|
// name: 'TRANSFORMATIONS_PACKAGE',
|
|
// ...TransformationsClientConfiguration,
|
|
// },
|
|
// {
|
|
// name: 'OUTPUTS_PACKAGE',
|
|
// ...OutputsClientConfiguration,
|
|
// },
|
|
{
|
|
name: 'AUTH_PACKAGE',
|
|
...authClient.config(),
|
|
},
|
|
]),
|
|
],
|
|
})
|
|
export class AppModule implements NestModule {
|
|
configure(consumer: MiddlewareConsumer) {
|
|
consumer
|
|
.apply(LoggerMiddleware)
|
|
.forRoutes
|
|
// InputsController,
|
|
// TransformationsController,
|
|
// OutputsController,
|
|
// PipelinesController,
|
|
();
|
|
}
|
|
}
|