Although one answer has been accepted but this worked for me:
- Make sure both your computer and android device are on same network.
- get your computer's ip address. (in case of mac type
ifconfig
inside terminal and look foren0/en1 -> inet
it should be something like19*.16*.1.4
.) (on windows, use `ipconfig) Open your mobile settings and go to network-> long press your wifi network-> modify network -> scroll down to advanced options -> chose proxy manual and in proxy hostname type your address i.e.
19*.16*.1.4
inside port enter your port. and save it.search for
what is my ip
in google chrome, and get your ip, lets say it is1**.1**.15*.2**
- try accessing
1**.1**.15*.2**:port/
from your mobile device.
It is as simple as this.