Using http-proxy-middleware in Vue2.0
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
For a detailed explanation on how things work, check out the guide and docs for vue-loader.
-
npm run dev
-
npm run remote
If you push the project into nginx or apache , you still need config proxy of nginx (or apache).
For more details , plz read http-proxy-middleware on Github