diff --git a/src/app.ts b/src/app.ts index 2d500f5..d9c0a8f 100644 --- a/src/app.ts +++ b/src/app.ts @@ -5,6 +5,7 @@ import swaggerUi from "swagger-ui-express"; import swaggerDocument from "./swagger.json"; import error from "./middlewares/error"; import { RegisterRoutes } from "./routes"; +import logMiddleware from "./middlewares/log"; const APP_HOST = process.env.APP_HOST || "0.0.0.0"; const APP_PORT = +(process.env.APP_PORT || 3000); @@ -15,6 +16,9 @@ const APP_PORT = +(process.env.APP_PORT || 3000); app.use(cors()); app.use(json()); app.use(urlencoded({ extended: true })); + + app.use(logMiddleware); + app.use("/", express.static("static")); app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(swaggerDocument));