Skip to content

npm start后front默认访问的本机backend,是否可以修改backend的访问地址,可以布置多个前端节点 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lingzhy opened this issue Jun 21, 2019 · 5 comments
Labels
question Further information is requested

Comments

@lingzhy
Copy link

lingzhy commented Jun 21, 2019

同主题,谢谢!

@chpengzh
Copy link
Member

npm start是本地调试用的启动方案,实际生产环境上是编译生成静态资源合并部署在jar包中或者单独部署在nginx中。

如果是本地调试要更改host访问地址的话,可以阅读一下front/config/config.js这个稳健配置

@glmapper
Copy link
Collaborator

同主题,谢谢!
sofa-dashboard-front/config/config.js

proxy: {
    '/api': {
      target: 'http://localhost:8099'   //这里修改
    },
  },

@glmapper glmapper added the question Further information is requested label Jun 21, 2019
@lingzhy
Copy link
Author

lingzhy commented Jun 21, 2019

@chpengzh @glmapper 谢谢2位

@lingzhy
Copy link
Author

lingzhy commented Jun 21, 2019

@chpengzh 如何生成静态资源合并部署的jar包,又如何部署呢?

@glmapper
Copy link
Collaborator

@chpengzh 如何生成静态资源合并部署的jar包,又如何部署呢?

参考:https://pro.ant.design/docs/deploy-cn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants