everyone! I’m currently trying to set up my connection between front-end server(React app) with backend server(NodeJs). I tried making requests from frontend to backend using axios .I tested the backend requests on Postman and they work as expected. However,I can’t start my front-end server because I have this error
“Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options.allowedHosts[0] should be a non-empty string.”
enter image description here
I put the proxy in package.json from my front-end and I imported cors on my backend server and I expected it to work since in all tutorials that I followed said the same thing
Maria Braga is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.