Check that MongoDB is running (mongod process for local, or Atlas cluster status for cloud). Verify the MONGODB_URI in .env. For Atlas, ensure your IP is whitelisted and credentials are correct.
Setting Up the DevTinder Backend Repository Clone, Install, and Configure
What should I do if MongoDB connection fails?
The answer
More FAQs in Setting Up the DevTinder Backend Repository Clone, Install, and Configure
Clone the repository with git clone, run npm install to install dependencies, copy .env.example to .env and fill in MongoDB URI and JWT secret, then run npm run dev to start the Express server.
PORT (e.g., 3000), MONGODB_URI (connection string for MongoDB), JWT_SECRET (for signing JWT tokens), NODE_ENV (development or production), and CLIENT_URL (for CORS configuration with the frontend).
Either works. Local MongoDB is faster and doesn't require internet. MongoDB Atlas is easier to set up (no local install) and is free for small projects. Use Atlas if you want a managed cloud database.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.