Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 1.24 KB

File metadata and controls

43 lines (31 loc) · 1.24 KB

Quick Setup with MongoDB Atlas (Cloud)

Step 1: Create Free MongoDB Atlas Account

  1. Go to: https://www.mongodb.com/cloud/atlas/register
  2. Sign up for free account
  3. Create a FREE cluster (M0 - Shared)
  4. Choose your region (closest to you)

Step 2: Get Connection String

  1. Click "Connect" on your cluster
  2. Choose "Connect your application"
  3. Copy the connection string (looks like):
    mongodb+srv://<username>:<password>@cluster0.xxxxx.mongodb.net/?retryWrites=true&w=majority
    

Step 3: Update .env File

Replace <username> and <password> with your Atlas credentials:

# Edit .env file
MONGODB_URI=mongodb+srv://yourusername:yourpassword@cluster0.xxxxx.mongodb.net/pentest-dashboard?retryWrites=true&w=majority

Step 4: Configure Network Access

  1. In Atlas dashboard, go to "Network Access"
  2. Click "Add IP Address"
  3. Click "Allow Access from Anywhere" (for development) or add your IP
  4. Save

Step 5: Create Database User

  1. Go to "Database Access"
  2. Click "Add New Database User"
  3. Create username/password (remember these!)
  4. Set role to "Atlas Admin" or "Read and write to any database"
  5. Use these credentials in your connection string

That's it! Your app will connect to MongoDB Atlas cloud database.