vue proxyTable 端口代理问题

Error occured while trying to proxy 无法代理端口

1
2
//运行时前端页面报错
Failed to load resource: the server responded with a status of 504 (Gateway Timeout)
1
2
//npm run dev初始时
2018-05-07 11:25 node[80587] (FSEvents.framework) FSEventStreamStart: ERROR: FSEvents_connect() => (ipc/send) invalid destination port (268435459)
1
2
//iterm2 报错
[HPM] Error occurred while trying to proxy request /api/info from localhost:8080 to http://******** (ECONNRESET) (https://nodejs.org/api/errors.html#errors_common_system_errors)

解决方法:
第一种:修改config/index.js下host,由localhost修改为当前内网ip(192.168..)。且重新编译。
第二种:重启iterm2。