The mongodb service has been started, and the browser can access localhost:27017, but the console still reports an error. Connection.DEFAULT_PORT cannot be read; newbies, please ask an expert to solve it
I also found a lot of articles on Baidu, but there is no solution. I don’t know where the problem lies. I said that this is how to use the default port. Newbie, please help!
This actually has nothing to do with the MongoDB server itself. It is a problem with the driver.
You need to first determine what version of the driver you are using, whether it is native-driver or mongoose.
You probably saw the code from somewhere else. The main problem may be that the driver version you are using is different from others.