I'm developing
(A) a single page application(using Vue/cli) and
(B) a nodeJS backend API(using koa) at the same time.
Ideally, in production mode, I can build my spa to distribution files and put them to (B) and serve those static files so my front-end page is as the same origin as my API.
But when I'm developing my applications, I serve my API for at port 3000 and run vue/cli webpack dev-server at port 8080.
They're not the same server nor the same origin, so I have to deal with something like Cors issue and url host name.
Is it possible developing both at the same time under the same origin just like they should be in production mode?
Aucun commentaire:
Enregistrer un commentaire