Question

Best way to connect DigitalOcean App front to DigitalOcean App backend

Hi!

I am fairly new to the web development and DO App platform. I’ve deployed my Django REST app on one DO App and Angular frontend on another one. Frontend connects to REST API via *.ondigitalocean.app address which was provided by DO for my Django app. It works but I guess it’s not the most optimal way to connect two DO Apps. Maybe there is some internal local address that I should use instead? Thank you!


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.

On the app platform, you have components. If your frontend is one component, your django can be another component.

During the creation of a component, you’ll see a “HTTP Routes” on Step 3

In that case, you can set your frontend component to be / and then your django component to be /api

That way, your frontend, you only have to direct all requests to /api which will point to the django when you deploy.