fix 本地运行端口占用问题

This commit is contained in:
luying
2020-10-23 18:05:46 +08:00
parent 94c632649b
commit 79ca79a6f4
3 changed files with 7 additions and 3 deletions

View File

@@ -31,6 +31,10 @@ export class GateHandler {
}
// select connector
let res = dispatch(userCode, connectors);
return resResult(STATUS.SUCCESS, {host: res.clientHost, port: res.clientPort});
if(process.env.NODE_ENV=='local') {
return resResult(STATUS.SUCCESS, {host: '127.0.0.1', port: res.clientPort});
} else {
return resResult(STATUS.SUCCESS, {host: res.clientHost, port: res.clientPort});
}
}
}