From 42a8091ddfa56f48c408782c22d0eea1f8473aee Mon Sep 17 00:00:00 2001 From: ProgrammerXD Date: Fri, 26 Jan 2024 12:20:11 +0530 Subject: [PATCH] pushing local code --- x-clone-backend/index.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/x-clone-backend/index.js b/x-clone-backend/index.js index 462f4fd..3b331d9 100644 --- a/x-clone-backend/index.js +++ b/x-clone-backend/index.js @@ -10,17 +10,13 @@ app.use(express.json()) const port = process.env.PORT || 5000 const uri = process.env.ATLAS_URI - - const connectDB = async () => { - console.log('Connecting to MongoDB with URI:', uri); try { await mongoose.connect(uri) .then(() => console.log('"Connected to database"')) .catch((err) => { console.log('Error connecting to database: ', err); console.log('Retrying connection in 5 seconds...'); - console.log('Connecting to MongoDB with URI:', uri); setTimeout(() => { connectDB() }, 5000); @@ -28,7 +24,6 @@ const connectDB = async () => { } catch (err) { console.log('Error connecting to database: ', err); console.log('Retrying connection in 5 seconds...'); - console.log('Connecting to MongoDB with URI:', uri); setTimeout(() => { connectDB() }, 5000);