Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

196
Views
¿Por qué Heroku puede conectarse a MongoDB Atlas pero no a mi entorno local?

Cuando me conecto a mi servidor MongoDB Atlas desde un servidor node.js, el siguiente código funciona completamente bien en Heroku:

 mongoose.connect(process.env.dbLink, { useNewUrlParser: true, useUnifiedTopology: true }) const db = mongoose.connection db.once("open", () => { console.log("Database connected") })

Sin embargo, cuando ejecuto esto en mi computadora, aparece el siguiente error:

 const serverSelectionError = new ServerSelectionError(); MongooseServerSelectionError: Could not connect to any servers in your MongoDB Atlas cluster. One common reason is that you're trying to access the database from an IP that isn't whitelisted. Make sure your current IP address is on your Atlas cluster's IP whitelist: https://docs.atlas.mongodb.com/security-whitelist/

Sin embargo, mi dirección IP está en la lista blanca.

¿Cómo puedo hacer que esto funcione en mi entorno local?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!