Skip to content

Commit

Permalink
Merge pull request #6 from coroo/fix_swagger_doc
Browse files Browse the repository at this point in the history
🔧 Fix swagger documentation for crawling all routes list
  • Loading branch information
gmarokov committed Oct 28, 2020
2 parents a941e63 + b5bb932 commit e3d08ac
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-prettier": "^3.1.2",
"fastify": "^2.15.1",
"fastify-swagger": "^2.5.0",
"fastify-swagger": "^2.6.0",
"mongodb-memory-server": "^6.2.4",
"mongoose": "^5.8.12"
}
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ const env = process.env.NODE_ENV;
// Configure HTTP server
const app = fastify.default({ logger: true });

// Register Swagger
app.register(swagger, Options);

routes.forEach(route => {
app.route(route);
});

// Register Swagger
app.register(swagger, Options);

const start = async (): Promise<void> => {
try {
await app.listen(config.app.port);
Expand Down

0 comments on commit e3d08ac

Please sign in to comment.