Migrate all VUE things to /web folders, now with your exclusive npm package.json and scripts. This fix the conflit issue about the express run with ESM and vue-cli-service with CommonJS.
Added a proxy on express to redirect all request on localhost:8000/ to localhost:8080 were vue server is online. This not influence the requests on localhost:8000/api, all /api request are directionally to express. This work on development mode only, on prod the vue app are builded to ./public folder.
This prevents one from interfering with the other, creating an abstraction between the two.
Another important point is the isolation of the libs, allowing both the API and WEBUI to change or update their technology without depending on each other.
What has changed?
/web
folders, now with your exclusive npmpackage.json
and scripts. This fix the conflit issue about theexpress
run with ESM andvue-cli-service
with CommonJS.express
to redirect all request onlocalhost:8000/
tolocalhost:8080
were vue server is online. This not influence the requests onlocalhost:8000/api
, all/api
request are directionally to express. This work on development mode only, on prod the vue app are builded to./public
folder.This prevents one from interfering with the other, creating an abstraction between the two.
Another important point is the isolation of the libs, allowing both the API and WEBUI to change or update their technology without depending on each other.