xxxxxxxxxx
if __name__ == '__main__':
# run app in debug mode on port 5000
app.run(debug=True, port=5000, host='0.0.0.0')
# 0.0.0.0 -> redirects to local network ip
# Navigate to http://[your-ipv4-address]:5000 from another machine in the same network, and you should be able to access your app.
xxxxxxxxxx
from flask import Flask
app = Flask(__name__)
@app.route('/')
def index():
return "Hello world!"
if __name__ == '__main__':
app.debug = True
app.run(host="0.0.0.0") #host="0.0.0.0" will make the page accessable
#by going to http://[ip]:5000/ on any computer in
#the network.