Question

Host a Django Angular PWA

I have already created an App using Django for my client. Now, I wish to separate the backend and frontend. Backend will be Django Rest Framework, and the frontend will be Angular 12. How will I host this on the same app? I can only find tutorials for one or the other, but not both.

Subscribe
Share

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

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.

Hey there!

You should be able to create the Angular frontend as a static site component within your application. You would then build the Django application as a webservice component within your application. The Django app would need to be configured to use a different route such as /api You could then reach the Angular frontend on / and the Django app on /api.

Unfortunately there isn’t a specific guide currently to cover both of these, but I’d recommend adding that as an idea here.

Hope it helps! Nate