Chandan Bera
Chandan Bera

Reputation: 45

How to solve Error: read ECONNRESET in nodejs

I am running an application using nodejs. when i am hitting in postman to "http://127.0.0.1:27017/test" this ip. then following error comes up enter image description here

Upvotes: 0

Views: 1746

Answers (1)

Matus Dubrava
Matus Dubrava

Reputation: 14482

Port 27017 is where you mongoDB is listening, not your application. Your application is listening on port 8081. As give by this line

var server = app.listen(8081 ...

So you need to change the endpoint that you are hitting from http://127.0.0.1:27017/test to http://127.0.0.1:8081/test

Upvotes: 2

Related Questions