MongooseServerSelectionError: connect ECONNREFUSED ::1:27017 in mac [duplicate]
MongoDB does not bind to localhost on ipv6 by default.
If you want it to listen on ::1 you will need to enable net.ipv6 and either enable net.bindIpAll or explicitly list the loopback address in net.bindIp