Fix MongoError on first connect

The default MongoDb port is 27017. An error occurs sometimes while I am running my Node & ExpressJS application, with the message:

message: 'failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED]' }

Several solutions are provided on the internet to fix this. But a lot of them did not work for me. The simplest method I find to fix this on MS Windows is:

1. Open your Command Prompt as administrator.
2. Type > net start mongodb

The mongodb service starts successfully.