2

I have been working on this app engine project and for some complications, I cannot deploy in appspot yet. I want to test my web app that should be accessed through mobile phone, so I deploy on my current machine through:

dev_appserver.py .

The command above deploys the web app om port 8080 and the app engine console on port 8000

My question is how do I access port 8080 of my machine, through another device (mobile phone) within my network.

I have tried my-machine-ip:8080 but to no avail, it gives me ERR_CONNECTION_REFUSED in chrome

PS my machine is running ubuntu 14

brian3415
  • 65
  • 1
  • 7
  • possible duplicate of [How can I access localhost from another computer in the same network?](http://stackoverflow.com/questions/19482164/how-can-i-access-localhost-from-another-computer-in-the-same-network) – Tim Jul 07 '15 at 20:16
  • Connection refused may be due to firewall – Tim Jul 07 '15 at 20:17
  • i have disabled firewall with `sudo ufw disable` – brian3415 Jul 07 '15 at 20:22

1 Answers1

4

Add the host option to the dev_appserver.py command. For example:

dev_appserver.py --host=0.0.0.0 .

You may need to set this to be able to access the development server from another computer on your network. An address of 0.0.0.0 allows both localhost access and hostname access. Default is localhost.

More info can be found at: https://cloud.google.com/appengine/docs/python/tools/devserver

Jeff Deskins
  • 1,650
  • 1
  • 10
  • 9
  • now this is the answer that I needed! thanks Jeff! everything is working as I wanted to. additional info for others who might have the same question: no need to disable firewall, just allow activity for the port needed e.g. for port 8080 `sudo ufw allow 8080` – brian3415 Jul 08 '15 at 06:03