Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

138
Vistas
What does the second (object) parameter, { useNewUrlParser: true }, do when connecting to the database with mongoose.connect()?

I'm having trouble understanding what does the second parameter to the mongoose.connect() do.

mongoose.connect(
  "mongodb://localhost:27017/myDatabase",
  { useNewUrlParser: true }
);

Could you, please, let me know?

Thank you!

What I've tried?

I've tried searching the MongoDB docs, the Mongoose docs, the Stack Overflow, and-of course-the web. I haven't found the explanation anywhere.

Why do I care?

I'm working through the Get Programming with Node.js book and everything's going fine so far. However, I've decided to take a step back and inspect the book's provided code which contains a lot of code not introduced/shown in the book itself. I'm feeling lost due to the sheer amount of information presented in the last couple of days so I've decided to go through the book's code, line by line, and try to understand as much as I can before moving onward; otherwise, I'd feel as if I've learned when I'm well aware that I haven't. Conceptually maybe, but not in any real, practical sense.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

With the help from Phil I've come across this. Although useNewUrlParser is depreciated, for the sake of a deeper understanding of older codebases, I found it worth it and so might you.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda