Error while connecting mongodb whit moongose

Viewed 29
1 Answers

In your config.ts try changing PORT to 5000 or any other except 27017, I guess you are trying to run your server on PORT 27017 which is the default PORT for mongodb server.

Make sure that your mongodb server is up and running, you can use Robo3t or MongoDB Compass if you are new to mongodb. These tools provide you with an easy GUI interface to interact with your database.

Suggestion: Try providing code snippets rather than screenshot links.

Related