ch06 server does not start
ChadEubanks opened this issue · comments
Hi,
To make sure im not typing something wrong. I cloned your code and tried running chapter 6. However, when attempting to start the server I get the following error:
events.js:71
throw arguments[1]; // Unhandled 'error' event
^
Error: failed to connect to [localhost:27017]
at Server.connect.connectionPool.on.server._serverState (/Users/chadeubanks/Dev/Node/node_social/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/server.js:530:73)
at EventEmitter.emit (events.js:126:20)
at connection.on._self._poolState (/Users/chadeubanks/Dev/Node/node_social/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:104:15)
at EventEmitter.emit (events.js:99:17)
at Socket.errorHandler (/Users/chadeubanks/Dev/Node/node_social/node_modules/mongoose/node_modules/mongodb/lib/mongodb/connection/connection.js:411:10)
at Socket.EventEmitter.emit (events.js:96:17)
at Socket._destroy.self.errorEmitted (net.js:329:14)
at process.startup.processNextTick.process._tickCallback (node.js:244:9)
Is there something missing in the books install process? MongoDB and Mongoose seemed to have been glossed over.
????? nothing????
The relevant line is this one:
Error: failed to connect to [localhost:27017]
Node is unable to connect to MongoDB at its default location (localhost on port 27017)
Sorry; so the fix here would be to start MongoDB and make sure it is running; you can verify using the mongo command line and running some test commands
Hi, I have the same problem....can you explain further how to 'start MongoDB and make sure it is running', please?