This is one of a series of small projects I am doing before trying to tackle the last of the back-end certification projects, and I have run into a problem where I get no errors but it is just not doing the post to the database.
Quite simply, I cannot determine why my react nodejs app is not sending the data to the mLab db.
I haven’t looked at your close too closely—is it correct that you intend to use the fetch() the code snippet you posted to interact with the following part of your Node/Express server?
If so, I think the problem is because you haven’t specified that the request’s method to be POST (the default is GET, you can verify this by logging inside the route.get route). To use fetch to interact with a post route, you need to specify the method to be so. Here is an edited example of an e-mail contact form that I made: