How can the frontend call the backend API?

I set up an Nginx server in front of my Vue frontend and my Node backend. Nginx redirects to requets to Vue and the browser shows the page. But when I want to log in (call the backend API), nothing happens. I assume that the backend is not reachable. I configured the axios backend call like so http://localhost:8080/api" for the backend. Do I assume it correctly that “behind” the reverse proxy, the servers can communicate via localhost with eachother?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I found out that they communicate with each other but somehow I cannot login via JWT. Maybe there is an issue with Redis but it connects properly without any errors.