Answer the question
In order to leave comments, you need to log in
How to add SPA vue in Yii2?
There is a SPA on VueJS, I do npm run build - I get the dist.
Now what should be done with the server side? It works for me as an API,
I would like to put my application on the '/' router.
I used to do it on nodeJS , now I can't figure out how to do it with Yii2
Answer the question
In order to leave comments, you need to log in
What for with it something to do if it works as api? As I understand it, vue lives separately for you and somewhere on the api subdomain on yii. Or in the api folder.
"this" is what?
Maxim is correct.
API on Yii is a separate application, SPA on vue is a separate one.
They can lie anywhere, even on different domains, even on a subdomain, even in a subdirectory.
I usually put vue-app in 'domain.ru/', and Yii in 'api.domain.ru' subdomain
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question