This commit is contained in:
Victor Radael
2022-02-03 10:52:22 -03:00
parent ca7bfe2e86
commit 7de6d5c14d
9 changed files with 4154 additions and 4167 deletions
+1 -1
View File
@@ -8,5 +8,5 @@ WORKDIR /app
COPY . /app/
COPY --from=packages /packages/node_modules /app/node_modules
RUN npm run build
EXPOSE 3000
EXPOSE 3333
ENTRYPOINT npm run start
+2 -1
View File
@@ -19,9 +19,10 @@ import { RestTransformationsController } from './rest/rest-transformations/rest-
import { RestPipelinesController } from './rest/rest-pipelines/rest-pipelines.controller';
import { RestEnrichmentsController } from './rest/rest-enrichments/rest-enrichments.controller';
import { RestFactoryController } from './rest/rest-factory/rest-factory.controller';
import { HealthModule } from './health/health.module';
@Module({
imports: [
RestInputsModule, RestOutputsModule, RestEnrichmentsModule, RestTransformationsModule, RestPipelinesModule, RestUserModule, RestFactoryModule,
RestInputsModule, RestOutputsModule, RestEnrichmentsModule, RestTransformationsModule, RestPipelinesModule, RestUserModule, RestFactoryModule, HealthModule,
// InputGrpcClientModule,
//OutputsModule,
//EnrichmentModule,
+1
View File
@@ -0,0 +1 @@
export class Health {}
+12
View File
@@ -0,0 +1,12 @@
import { Controller, Get } from '@nestjs/common';
import { HealthService } from './health.service';
@Controller('health')
export class HealthController {
constructor(private readonly healthService: HealthService) {}
@Get()
check() {
return this.healthService.check();
}
}
+9
View File
@@ -0,0 +1,9 @@
import { Module } from '@nestjs/common';
import { HealthService } from './health.service';
import { HealthController } from './health.controller';
@Module({
controllers: [HealthController],
providers: [HealthService],
})
export class HealthModule {}
+8
View File
@@ -0,0 +1,8 @@
import { Injectable } from '@nestjs/common';
@Injectable()
export class HealthService {
check() {
return { message: 'Ok' };
}
}
+9 -9
View File
@@ -1,24 +1,24 @@
import { NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { writeFileSync } from 'fs';
import { AppModule } from './app.module';
require("dotenv").config();
import { AppModule } from './app.module';
import { config } from 'dotenv';
config();
async function bootstrap() {
const app = await NestFactory.create(AppModule);
const config = new DocumentBuilder()
.setTitle('Maestro Grpc Documentation')
.setDescription('Documentation for Maestro gateway')
.setVersion('1.0')
.addBearerAuth()
.build();
.setTitle('Maestro Grpc Documentation')
.setDescription('Documentation for Maestro gateway')
.setVersion('1.0')
.addBearerAuth()
.build();
const document = SwaggerModule.createDocument(app, config);
writeFileSync('./swagger.json', JSON.stringify(document));
SwaggerModule.setup('api', app, document);
await (await app).listen(3000);
await app.listen(3333);
}
bootstrap();
+1 -1
View File
File diff suppressed because one or more lines are too long
+4111 -4155
View File
File diff suppressed because it is too large Load Diff