Database Connection Offline

We are unable to establish a connection to the MongoDB database. This usually means that your local IP address is not whitelisted on MongoDB Atlas, or your database server is offline.

How to resolve:

  • Whitelist your IP on Atlas: Log in to your MongoDB Atlas Console, navigate to "Network Access", and add your current public IP address or set it to allow access from anywhere (0.0.0.0/0).
  • Check your environment configuration: Ensure the MONGODB_URI environment variable inside your .env.local file is correct.
  • Use local MongoDB: If you have MongoDB installed locally, you can change the connection string to mongodb://127.0.0.1:27017/shoplink.
Technical Error Details
Schema hasn't been registered for model "User".
Use mongoose.model(name, schema)