E
E
Egor Vavilov2020-05-04 18:54:04
Django
Egor Vavilov, 2020-05-04 18:54:04

How to host Django and Vue.js on the same server?

I have a working and running Django project (HTML is rendered via Django templates). Started rewriting it with Django Rest Framwork + Vue.js. I have almost finished doing it, I will soon deploy to the server. And then the question arose, how to do it? That is, how to host DRF and Vue.js together on the same server? After all, Django accepts all requests through its URL router. And you need Vue.js to do this through index.html.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2020-05-04
@Shecspi

All requests to URLs starting with /api are redirected by the web server to WSGI, any others are treated as static.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question