Skip to content

Commit c632558

Browse files
Format
1 parent f3cca52 commit c632558

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const express = require("express");
22
const bodyParser = require("body-parser");
33
const cors = require("cors");
4-
const path = require("path");
54
const swaggerUi = require("swagger-ui-express");
5+
const path = require("path");
66
const openApiSpec = require("../swagger/openapi.json");
77

88
const app = express();
@@ -20,10 +20,10 @@ app.use("/api/projects", projectRoutes);
2020
app.use("/api/tasks", taskRoutes);
2121
app.use("/api/users", userRoutes);
2222

23-
// Swagger UI
23+
// Serve Swagger UI
2424
app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(openApiSpec));
2525

26-
// OpenAPI JSON
26+
// Serve the OpenAPI JSON
2727
app.get("/openapi.json", (req, res) => {
2828
res.sendFile(path.join(__dirname, "../swagger/openapi.json"));
2929
});

0 commit comments

Comments
 (0)