Skip to content

Commit

Permalink
feat:added_logger
Browse files Browse the repository at this point in the history
  • Loading branch information
farooqpk committed Jan 2, 2025
1 parent ce4cf7a commit fb01a56
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
60 changes: 60 additions & 0 deletions package-lock.json

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

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@types/bcrypt": "^5.0.2",
"@types/cors": "^2.8.13",
"@types/jsonwebtoken": "^9.0.2",
"@types/morgan": "^1.9.9",
"@types/uuid": "^9.0.8",
"axios": "^1.4.0",
"bcrypt": "^5.1.1",
Expand All @@ -30,6 +31,7 @@
"helmet": "^7.1.0",
"ioredis": "^5.4.1",
"jsonwebtoken": "^9.0.0",
"morgan": "^1.10.0",
"prisma": "^6.1.0",
"socket.io": "^4.7.1",
"uuid": "^9.0.1",
Expand Down
4 changes: 3 additions & 1 deletion src/utils/configureExpress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { chatRouter } from "../routes/chat";
import { messageRouter } from "../routes/message";
import { groupRouter } from "../routes/group";
import cookieParser from "cookie-parser";
import path from "node:path";
import { aiRouter } from "../routes/ai";
import morgan from "morgan";

export function configureExpress(app: express.Express) {
app.use(express.json());
Expand Down Expand Up @@ -51,6 +51,8 @@ export function configureExpress(app: express.Express) {
})
);

app.use(morgan("common"));

app.get("/api", (req, res) => res.send("Hello World!"));
app.use("/api/auth", authRouter);
app.use("/api/user", userRouter);
Expand Down

0 comments on commit fb01a56

Please sign in to comment.