Skip to content

Commit adfdf76

Browse files
committed
add
1 parent 9ec04b2 commit adfdf76

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

server/index.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,13 @@ mongoose.connect(mongoURI)
5252
dbReady = true;
5353
console.log('MongoDB connected');
5454

55-
// Start server only after DB connection is established
5655
server.listen(PORT, () => {
5756
console.log(`Server running on PORT: ${PORT}`);
5857
});
5958
})
6059
.catch(err => {
6160
console.error('MongoDB connection error:', err);
6261
dbReady = false;
63-
// Handle case where DB connection fails and don't start the server
6462
});
6563

6664
// Socket.IO Connection and Driver Tracking
@@ -369,7 +367,7 @@ app.post("/signup", async (req, res) => {
369367
}
370368
});
371369
//Driver Login
372-
app.post('/api/driverlogin', async (req, res) => {
370+
app.post('/driverlogin', async (req, res) => {
373371
const { username, password } = req.body;
374372
console.log(`Incoming request: ${req.method} ${req.url}`);
375373

0 commit comments

Comments
 (0)