Skip to content

Commit

Permalink
Implement logging
Browse files Browse the repository at this point in the history
  • Loading branch information
apsinghdev committed Sep 1, 2024
1 parent a1957ea commit ecb7ba2
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 0 deletions.
98 changes: 98 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"morgan": "^1.10.0",
"nodemon": "^3.1.3",
"socket.io": "^4.7.5"
}
Expand Down
4 changes: 4 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import cors from "cors";
import * as http from "http";
import { Server } from "socket.io";
import dotenv from "dotenv";
import morgan from "morgan";

dotenv.config();

// Log the middleware
app.use(morgan('combined'));

const app = express();
const PORT = process.env.PORT || 8080;

Expand Down

0 comments on commit ecb7ba2

Please sign in to comment.