D
D
Drjabaka2015-06-15 02:52:10
Flask
Drjabaka, 2015-06-15 02:52:10

Flask public site?

Hey! The question is: app.run(host='0.0.0.0') - is the site visible on the Internet, if not, how can it be done on a laptop (laptop=server)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valery Ryaboshapko, 2015-06-15
@valerium

app.run(host='0.0.0.0') will make Flask listen on port 80 on all IP addresses you have on your computer. The visibility of the site to the Internet depends on the configuration of your network and the services provided by your ISP.
If the laptop is connected to a router, then you need to configure port forwarding of the 80th port to the laptop on the router. In addition, make sure that the provider provides you with a "white" IP address (usually this is an additional service).

A
Alexander, 2015-06-15
@bIbI4k0

0.0.0.0 equates to 127.0.0.1, localhost. Substitute an interface that looks to the external network and get access from outside:
app.run(host='192.168.1.1')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question