mean-stack-crud-app
mean-stack-crud-app copied to clipboard
MongoNetworkError
Hello There! Running thru your tutorial and getting stuck with a Database could not connected: MongoNetworkError
Here's what I get when I run nodemon server
[nodemon] 2.0.2
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node server.js`
(node:24188) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
Connected to port 4000
Database could not connected: MongoNetworkError: failed to connect to server [localhost:27017] on first connect [Error: connect ECONNREFUSED 127.0.0.1:27017
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16) {
name: 'MongoNetworkError',
[Symbol(mongoErrorContextSymbol)]: {}
}]
Any thoughts? Can't seem to get past this! Bet it is something super simple.
The instructions on the website only have you install Mongoose which is an ODM (Object Document Mapper) for MongoDB. You need to actually install MondoDB.
https://stackoverflow.com/questions/50173080/mongonetworkerror-failed-to-connect-to-server-localhost27017-on-first-connec