0 votes
in Python Flask by
How to change default host and port in Flask?

1 Answer

0 votes
by
Flask default host and port can be changed by passing the values to host and port parameters while calling run method on the app.

from flask import Flask

app = Flask(__name__)

 

@app.route("/")

def index():

    return "Hello, World!"

 

if __name__ == "__main__":

    app.run(host="0.0.0.0", port=8080)

Related questions

0 votes
asked Jun 10, 2022 in Apache by Robin
0 votes
asked Dec 24, 2022 in Python Flask by sharadyadav1986
...