Skip to content

Commit

Permalink
feat(): docPath based on SERVICE_BASE
Browse files Browse the repository at this point in the history
  • Loading branch information
bgdsh committed Jul 4, 2019
1 parent 9312253 commit 888681d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ async function bootstrap() {
.addBearerAuth()
.build();
const document = SwaggerModule.createDocument(app, options);
SwaggerModule.setup('/form-service-api-doc', app, document);
const docPath = process.env.SERVICE_BASE
? `${process.env.SERVICE_BASE}-api-doc`
: '/api-doc';
SwaggerModule.setup(docPath, app, document);
app.enableCors(corsOptions);
app.use(cookieParser());
// 使用通用的数据验证 pipe
Expand Down

0 comments on commit 888681d

Please sign in to comment.