I had the same issue. What I did is to run mongodb
command in another terminal. Then, run my application in another tab. This resolved my problem. Though, I am trying other solution such as creating a script to run mongodb
before connection is made.