Closed confidence68 closed 6 years ago
我用vue create一个项目,在vue.config.j中配置了proxy,但是不起作用
devServer: { open: process.platform === 'darwin', host: '0.0.0.0', port: 8083, https: false, hotOnly: false, // 查阅 https://github.com/vuejs/vue-docs-zh-cn/blob/master/vue-cli/cli-service.md#配置代理 proxy: { '/api': { target: 'http://localhost:8090', pathRewrite: { '^/api': '' } } }, // string | Object before: app => {} },
报如下错误
Proxy error: Could not proxy request /auth/login from localhost:8083 to http://localhost:8090/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
几位好,这个仓库只会讨论一些零散的非正式的中文文档翻译,不讨论技术本身。 cli 的技术问题反馈请移步至:https://github.com/vuejs/vue-cli 或其它技术论坛和问答社区。这些地方有更多更活跃的人可以帮到大家。 更何况 cli 的中文文档也已经“转正”了:https://cli.vuejs.org/ 因此这里对该 issue 做关闭处理。 感谢理解
我用vue create一个项目,在vue.config.j中配置了proxy,但是不起作用
报如下错误
Proxy error: Could not proxy request /auth/login from localhost:8083 to http://localhost:8090/. See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).