From 339432df1608dc33700227947688fa505753e501 Mon Sep 17 00:00:00 2001 From: Gabriel Rosa Date: Fri, 15 Jul 2022 15:24:42 -0300 Subject: [PATCH] FIX: server urls on swagger --- src/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 7e54651..add8d4c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -42,7 +42,11 @@ async function bootstrap() { .setDescription('Documentation for Maestro gateway') .setVersion('1.0') .addBearerAuth() - .addServer('http://127.0.0.1:3333') + .addServer( + process.env.ENV === 'local' + ? 'http://127.0.0.1:3333' + : 'https://maestro.dev.dadosfera.ai', + ) .build(); const document = SwaggerModule.createDocument(app, config);