My MongoDB server is running locally, i can execute my commands on shell also but when i try to connect MongoDB with Node.js it gives me error

Use 127.0.0.1 rather than localhost.

The following

indicates that your localhost resolve to the IPv6 version.

1 Like