Answer the question
In order to leave comments, you need to log in
How to setup Vue + Laravel environment for SPA development?
I have VUE CLIv3 I
have a local Apache server with a clean, latest Laravel
How do I set everything up so that I can run npm run serve and at the same time I can work with Laravel in parallel and in general the development is as convenient as possible?
Because for example, when you try to execute any xhr request, it comes from localhost:8080 /article/post, but you need it to be localhost /article/post
Answer the question
In order to leave comments, you need to log in
Since you have a SPA, it makes no sense to collect the front using Laravel, and generally keep them in the same folder.
Not only the port, but also the address to which the SPA will access via the API should be moved to variables so that the front does not depend on the back at all. As for setting up the environment, the question is strange, you can generally not keep a node on the server, collect everything locally and deploy it as static. Well, there are many options for the backend. For example
laradock.io
https://forge.laravel.com/
But as practice shows, small applications even on shared hosting from Beget feel fine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question