bryantheastronaut / mernCommentBox

A Tutorial on creating a MERN Stack App from the Facebook Comment React Tutorial
https://medium.com/@bryantheastronaut/react-getting-started-the-mern-stack-tutorial-feat-es6-de1a2886be50
248 stars 92 forks source link

Cannot connect to api or mongodb #9

Closed liberatomota closed 6 years ago

liberatomota commented 7 years ago

Hello,

I was folling the tutorial but then I start a fresh installation from the master branch. Run npm install and npm run start-dev.

Client is rendered and running but got this error: GET http://localhost:3001/api/comments net::ERR_EMPTY_RESPONSE if I go to the browser and point to localhost:3001 I get http://localhost:3001/ 404 (Not Found)

Connection to mongoDB: I start a DB in mLabs has the tutorial says, edited the server.js with my db information. The response form the DB is: name: 'MongoError',

message: 'Authentication failed.',
ok: 0,
code: 18,
errmsg: 'Authentication failed.' 

but when I try to connect from the mongo shell I can access the DB.

Thanks for the great tutorial and to share your code

ljsherlock commented 6 years ago

Did you do what I stupidly did and leave the less than and greater than symbols before and after your username and password?

This was it for me.

liberatomota commented 6 years ago

Thanks for the reply, I didn't forgot to remove the symbols. I end up using a framework with another connection method: meteor