I’m trying to make a backend server for a newsletter for a basic website I’m building. I’ve got the server up and running however, when I try testing the endpoint it messes up.
When I try to test the API endpoint with POST using curl I get the following:
[Failure message that pops up](https://i.sstatic.net/UmzB3qjE.png)
I personally don’t want to hard code the needed credentials into my server.js file:
[My Main.js file for frontend side](https://i.sstatic.net/UmFc4m3E.png)
[My package.json file](https://i.sstatic.net/nmSJQlPN.png)
[My server.js file for backend side](https://i.sstatic.net/AJb0Y418.png)
[Continued for the server.js file](https://i.sstatic.net/jQIyEWFd.png)
New contributor
Anthony Patton is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.