So my backend is PHP based (processwire), served by trusty old MAMP (localhost:8888/mysite
). I'd like to serve my vue.js app from the same server, as well.
npm run dev
starts a local server on localhost:8080
, that works for doing the front end stuff, hot reloading and all.
With npm run build
i can build my app so it can be served from MAMP.
But how can I get hot reloading working over MAMP so I can keep developing through apache (using localhost:8888/mysite
)? Is this possible?
thank you!
I tried but couldn't get hot loading to work by proxying through Apache. The other way around wasn't so hard, in webpack.config.js:
proxy: {
'/mysite/api/**': {
target: 'http://localhost:8888',
secure: false,
"changeOrigin": true
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With