ECONNREFUSED error when connecting to mongodb from node.js

前端 未结 13 1278
不思量自难忘°
不思量自难忘° 2020-11-27 05:51

I know I\'m doing some very stupid and noobish, but I\'m hoping someone can help me set up a basic database connection to mongodb from node.js on a mac.

I\'ve instal

13条回答
  •  面向向阳花
    2020-11-27 06:35

    I tried every possible solution,butit didn't help me. I took a break and I changed the following. Simple typo. May help someone is same situation. From: app.listen((port)=>console.log(Server is running at port ${PORT}))

    To: app.listen(PORT, console.log(Server is running at port ${PORT})) The earlier got me to connect to database mongo atlas but get request was Error: connect ECONNREFUSED

提交回复
热议问题