K
K
Kutuzov_ska2018-07-31 11:52:09
Yii
Kutuzov_ska, 2018-07-31 11:52:09

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

2 answer(s)
M
Maxim Timofeev, 2018-08-01
@webinar

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?

F
Fedor Grebennikov, 2018-08-05
@grebennikovf

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 question

Ask a Question

731 491 924 answers to any question