I am developing a simple app using React Native. I am testing it on Android device. I have created a Node.js server to listen to the requests, it is running at http://localh
Use the reverse command of the Android Debug Bridge tool (adb):
adb reverse - reverse socket connections.
reverse specs are one of:
tcp:
localabstract:
localreserved:
localfilesystem:
For example:
adb reverse tcp:3333 tcp:3333
This makes localhost:3333
accessible from your device. You can also use different ports. For example:
adb reverse tcp:8081 tcp:3333
This will redirect the device port 8081 to the local port 3333.