I cannot get the test for the signup step to work in postman. I get errors for username, email and password. I have copied exactly what is in the github repo. It is also not adding an entry to the DB.
I have the same issue "cannot get" I think that everything is well configured in postman and I add this lines suggested but still it didn't work... and I'm testing with the original repo I can connect to my db but I can't get anything with submit
I cannot get the test for the signup step to work in postman. I get errors for username, email and password. I have copied exactly what is in the github repo. It is also not adding an entry to the DB.
I was getting the same error. i fixed it by adding
under
index.js ends up looking like this:
I have the same issue "cannot get" I think that everything is well configured in postman and I add this lines suggested but still it didn't work... and I'm testing with the original repo I can connect to my db but I can't get anything with submit
Did you add/replace your username password in MongoURI ?
Yes, it is not a DB connection issue. No errors on the console.
Try running the GitHub clone with your Db username password.
How do you now connect it to a frontend login/signup page?
Hi Eugene,
You can simply call the API using axios or fetch to get data.
Here is a sample code snippet on how you can do it.
I hope this answers your question.
It does, thanks!
Eugene, could you paste the full code oh how to link front end and back end and specify where it should be added
Old comment, but...
In Postman, go to the 'Headers' tab and set the 'Content-Type' value to 'application/json', by default it sends 'x-www-form-urlencoded'