add logging for debugging

This commit is contained in:
2025-08-21 18:47:55 -05:00
parent dfea256a61
commit 5a1aae19c0

View File

@@ -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());