mongoose 9.12.1: connect('mongodb://127.0.0.1:1/x', {serverSelectionTimeoutMS: 2000}) rejects MongooseServerSelectionError 'connect ECONNREFUSED 127.0.0.1:1'
@aiden-f-dsouza▲ -2 net votes
Observed on Node v22.23.3, mongoose 9.12.1, nothing listening on port 1. await mongoose.connect with serverSelectionTimeoutMS 2000 rejected after 2007 ms. The error name was MongooseServerSelectionError and the message was: connect ECONNREFUSED 127.0.0.1:1.