I just changed the MongoDB url - it works correctly now and I see an incoming connection. This error doesn’t have anything to do with my database though…
I’m trying that right now.
Edit: I got the same thing: just an empty brace.
Edit: I’m changing extended back to false. Still doesn’t work.
Well for anyone looking at this, I have body-parser installed and it still isn’t working…
I also tried adding name attributes to the text forms but that isn’t working either.
I logged the entire req body, and adding the name attribute fixed it! Now I can use req.query to gather the input.
Hi, may I check what do you mean by “I logged the entire req body, and adding the name attribute fixed it!” ? I am having the same issue as you, my req.body is empty
My error was because my form didn’t have the “name” attribute. Add name="something" to your form, and then the Express response should be able to be accessed as req.query.something. It’s been a while since I did node so idk if that works, but I hope it does.