librelist archives

« back to archive

Accessing flask from another machine on the same network

Accessing flask from another machine on the same network

From:
Norbert Markowicz
Date:
2012-11-18 @ 03:52
Hi all,

Currently I'm web developing on the machine which has flask running in the
background. To connect, I simply run go to http://localhost:5000 to access
my index.html.

I'm looking to access the index.html from another PC on the network, but
simply inputting 192.168.1.127:5000   (the ip of the PC running flask)
fails to "establish a connection".

Any ideas?

Thanks in advance fellas.

Re: [flask] Accessing flask from another machine on the same network

From:
Kenneth Reitz
Date:
2012-11-18 @ 03:59
Try '0.0.0.0:5000'.

-- 
Kenneth Reitz


On Sunday, November 18, 2012 at 4:52 AM, Norbert Markowicz wrote:

> Hi all,
> 
> Currently I'm web developing on the machine which has flask running in 
the background. To connect, I simply run go to http://localhost:5000 to 
access my index.html. 
> 
> I'm looking to access the index.html from another PC on the network, but
simply inputting 192.168.1.127:5000 (http://192.168.1.127:5000)   (the ip 
of the PC running flask) fails to "establish a connection". 
> 
> Any ideas?
> 
> Thanks in advance fellas. 

Re: [flask] Accessing flask from another machine on the same network

From:
Mitchell Hashimoto
Date:
2012-11-18 @ 04:05
KENNETH! I know its 5:04 AM in Brno right now and you are ALSO awake. Fuck
yeah jet lag.

I apologize for this off topic email.


On Sun, Nov 18, 2012 at 4:59 AM, Kenneth Reitz <me@kennethreitz.com> wrote:

> Try '0.0.0.0:5000'.
>
> --
> Kenneth Reitz
>
> On Sunday, November 18, 2012 at 4:52 AM, Norbert Markowicz wrote:
>
> Hi all,
>
> Currently I'm web developing on the machine which has flask running in the
> background. To connect, I simply run go to http://localhost:5000 to
> access my index.html.
>
> I'm looking to access the index.html from another PC on the network, but
> simply inputting 192.168.1.127:5000   (the ip of the PC running flask)
> fails to "establish a connection".
>
> Any ideas?
>
> Thanks in advance fellas.
>
>
>

Re: [flask] Accessing flask from another machine on the same network

From:
Kenneth Reitz
Date:
2012-11-18 @ 04:09
Haha! I am indeed :) 

Absolutely starving, though. I can't wait for breakfast to open.  

-- 
Kenneth Reitz


On Sunday, November 18, 2012 at 5:05 AM, Mitchell Hashimoto wrote:

> KENNETH! I know its 5:04 AM in Brno right now and you are ALSO awake. 
Fuck yeah jet lag.
> 
> I apologize for this off topic email. 
> 
> 
> On Sun, Nov 18, 2012 at 4:59 AM, Kenneth Reitz <me@kennethreitz.com 
(mailto:me@kennethreitz.com)> wrote:
> > Try '0.0.0.0:5000 (http://0.0.0.0:5000)'.
> > 
> > -- 
> > Kenneth Reitz
> > 
> > 
> > On Sunday, November 18, 2012 at 4:52 AM, Norbert Markowicz wrote:
> > 
> > > Hi all,
> > > 
> > > Currently I'm web developing on the machine which has flask running 
in the background. To connect, I simply run go to http://localhost:5000 to
access my index.html. 
> > > 
> > > I'm looking to access the index.html from another PC on the network,
but simply inputting 192.168.1.127:5000 (http://192.168.1.127:5000)   (the
ip of the PC running flask) fails to "establish a connection". 
> > > 
> > > Any ideas?
> > > 
> > > Thanks in advance fellas. 
> > 
> 

Re: [flask] Accessing flask from another machine on the same network

From:
Simon Sapin
Date:
2012-11-18 @ 08:33
Le 18/11/2012 04:52, Norbert Markowicz a écrit :
> Hi all,
>
> Currently I'm web developing on the machine which has flask running in
> the background. To connect, I simply run go to http://localhost:5000 to
> access my index.html.
>
> I'm looking to access the index.html from another PC on the network, but
> simply inputting 192.168.1.127:5000 <http://192.168.1.127:5000>   (the
> ip of the PC running flask) fails to "establish a connection".

Hi,

See http://flask.pocoo.org/docs/quickstart/#public-server

-- 
Simon Sapin

Re: [flask] Accessing flask from another machine on the same network

From:
pronoyc@gmail.com
Date:
2012-11-18 @ 08:55
The server is supposed to run at 0.0.0.0 instead of 127.0.0.1
app.run('0.0.0.0')

Then you can use the ip like you've mentioned to access the server.
Provided the server is on the same subnet as the client.


On Sun, Nov 18, 2012 at 2:03 PM, Simon Sapin <simon.sapin@exyr.org> wrote:

> Le 18/11/2012 04:52, Norbert Markowicz a écrit :
> > Hi all,
> >
> > Currently I'm web developing on the machine which has flask running in
> > the background. To connect, I simply run go to http://localhost:5000 to
> > access my index.html.
> >
> > I'm looking to access the index.html from another PC on the network, but
> > simply inputting 192.168.1.127:5000 <http://192.168.1.127:5000>   (the
> > ip of the PC running flask) fails to "establish a connection".
>
> Hi,
>
> See http://flask.pocoo.org/docs/quickstart/#public-server
>
> --
> Simon Sapin
>



-- 
Regards,

Pronoy Chopra
http://blog.pronoy.in <http://www.pronoy.in/about>/
http://www.twitter.com/pronoyc