How to access a local server from an Android device

1

I have a server in Django running on my computer "localhost: 8000 / posts", and I'm creating an Android client to access it.

Debugging my application on a real device, I tried to access my IPv4 knowing that both the computer and the cell phone are on the same subnet as "192.168.XX: 8000 / posts", but I can not access this link through the mobile browser .

I checked the "chrome: // inspect /" option in Google Chrome, but I do not know how this can help me or if you can help me.

However, does anyone know that it's the best alternative to establish this connection for both my App and browser?

    
asked by anonymous 03.05.2016 / 18:14

1 answer

1

I discovered what was happening, I was only able to access the host "localhost: 8000" or "127.0.0.1:8000" because the Django server was only accepting local access, since I only stayed with the

python manage.py runserver

So when I started the server with the

python manage.py runserver 0.0.0.0:8000

The same returned to accept connections by my ip "129.169.x.x: 8000"

    
04.05.2016 / 16:40