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)
...