Database Connection

Set up and configure MongoDB for your PortfoHub project

MongoDB Atlas Setup
  1. Create a MongoDB Atlas account at https://www.mongodb.com/cloud/atlas
  2. Set up a new cluster (free tier is sufficient for most projects)
  3. Configure database access and network settings
  4. Obtain your MongoDB connection string
.env.local
1DATABASE_URL="mongodb+srv://<username>:<password>@cluster0.mongodb.net/your_database_name?retryWrites=true&w=majority"

MongoDB Atlas Dashboard

MongoDB Atlas Dashboard