Answer the question
In order to leave comments, you need to log in
How to develop on vue cli + backend on another server?
There is Openserver, where a ready-made backend is written in PHP (Yii2), and there is a project on vue-cli. How to "combine" them? Now it turns out that two local servers are running. Is it possible to somehow combine the frontend and backend on the same local server?
UPD: the second server is created when I write "npm run serve" to work with vue
Answer the question
In order to leave comments, you need to log in
Look here . The truth is in English, but you can understand. It shows how to deal with CORS
The one that starts when it is serve
adapted for development: there is a hot reload and everything else.
You can cheat build --watch
and use your prod server right away, but it's slow and inconvenient.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question