Fred Zhang Fred Zhang - 5 months ago 36
Android Question

How to modify IP & port use react-native Android?

I used the react-native Android demo project AwesomeProject, run react-native run-android to start webserver and install Android APK. The default webserver configuration is localhost:8081, how can I modify the webserver port, and how to update recording ip&port in Android project.

I just found that can modify ip address in Android debug setting, it seems "getDebugServerHost" is a private API, does Facebook provide any API to change ip&port.


Unfortunately, the port is currently (2015/09/23) hardcoded. I believe this will be changed in time as it already has an Issue raised from a high level contributor to the project.