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

258
Vistas
mongoose error `users.insertOne()` buffering timed out after 10000ms

I keep getting this MongoDB error, this is my connection to mongodb. I am trying to make a register and login application

const { MongoClient } = require('mongodb');

const uri = "mongodbconnection";
const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true });
client.connect(error => {
  const collection = client.db("test").collection("devices");
  // perform actions on the collection object
  client.close();
});

this is the signup application

router.post('/register', async (req, res) => {
  //hashing the password
  const hashedPwd = await bcrypt.hash(req.body.password, saltRounds);
    //using passport-local for authentication
    const newUser = new User({
        email: req.body.email,
        password: hashedPwd
    })

    try {
        await newUser.save()
        console.log("new user created")
    } catch (error) {
        if (error) {
            console.log(error)
        }
    }
})
about 4 years ago · Juan Pablo Isaza
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