So currently I have built an application that uses Vue.js and PHP. The PHP is my backend and talks a mysql database.
I am running this on my local machine (Mac). When I run my vue.js side, I use the command npm run dev This starts a webserver and I view it by going to address localhost:8080.
Then for the PHP I start another web server using MAMP. This runs Apache and Mysql. To access these they are stored at localhost:8888.
I make post and get requests from the vue.js side to the PHP side. And the only way I can get this to work is by using a chrome extension called: Allow control Allow origin. Otherwise I get a cross origin error and they won't communicate.
Is there therefore a way that I can run both on the same webserver? I'm not sure how