我的后台是node开发的,然后前端想用vue,但是现在我不知道如何很好的结合他们。option1:npm run dev这样访问nodejs的api不是跨域了么(端口不同)option2:npm run build这样我每次修改完vue不是还要我在手动再去执行以下这个命令?
是不是要我开发的时候允许后台跨域访问,发布时在去build同时禁止跨域访问?望大神给个可行的解决方案。
Nowadays, cross-domain joint debugging between front-end and back-end is commonplace, so setting up a proxy for your development environment has become part of the front-end workflow. server
server
Nowadays, cross-domain joint debugging between front-end and back-end is commonplace, so setting up a proxy for your development environment has become part of the front-end workflow.
server