add logging for debugging
This commit is contained in:
@@ -7,6 +7,12 @@ require('dotenv').config();
|
||||
const app = express();
|
||||
const port = process.env.SERVER_PORT || 3000;
|
||||
|
||||
// add logging for troubleshooting
|
||||
app.use((req, res, next) => {
|
||||
console.log(`Incoming request: ${req.method} ${req.url}`);
|
||||
next();
|
||||
});
|
||||
|
||||
// Middleware to parse incoming JSON data from the frontend
|
||||
app.use(express.json());
|
||||
|
||||
|
Reference in New Issue
Block a user