更改默认的 react-native android 端口
Change default react-native android port
问题
我正在开发一个使用 MongoDB 领域和 Redux 的应用程序。当项目中只有 redux 时,没问题。但是在 debuggin it with realm installed errors started happening. Realm is using port=8083
for its XML requests, while React Native is running by default in port=8081
. So, when realm does its first XML request to initialize 之后,realm app react native 崩溃了。
故障排除
通过查看来自 MongoDB 的 react-native-debugger documentation its possible to change de debugger port. Nice! And then i searched for a way to do the same in react-native. As weird as it sounds, apparently react-native's android port is by the react-native init
, meaning that only the default 8081
port works. Actually, only the metro server and ios port can be changed. I requested support,关于改变它们的 default port to 8081
。但仍在等待答案。
这是应用 repository
有什么建议吗?
提前致谢!
因此,React 本机应用程序在模拟器中 运行 并且运行良好。然后,我有了关闭物理设备中 SIM 卡互联网的想法。这样做之后,使用了本地 wi-fi(也连接了计算机)。沙赞...!就是这样。故事结局。这就是问题所在。让我烦恼的是文档忘记提到这个用例。我能找到的最近的是 this
问题
我正在开发一个使用 MongoDB 领域和 Redux 的应用程序。当项目中只有 redux 时,没问题。但是在 debuggin it with realm installed errors started happening. Realm is using port=8083
for its XML requests, while React Native is running by default in port=8081
. So, when realm does its first XML request to initialize 之后,realm app react native 崩溃了。
故障排除
通过查看来自 MongoDB 的 react-native-debugger documentation its possible to change de debugger port. Nice! And then i searched for a way to do the same in react-native. As weird as it sounds, apparently react-native's android port is react-native init
, meaning that only the default 8081
port works. Actually, only the metro server and ios port can be changed. I requested support,关于改变它们的 default port to 8081
。但仍在等待答案。
这是应用 repository 有什么建议吗?
提前致谢!
因此,React 本机应用程序在模拟器中 运行 并且运行良好。然后,我有了关闭物理设备中 SIM 卡互联网的想法。这样做之后,使用了本地 wi-fi(也连接了计算机)。沙赞...!就是这样。故事结局。这就是问题所在。让我烦恼的是文档忘记提到这个用例。我能找到的最近的是 this