Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to change port in flask app

from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

if __name__ == '__main__':
    app.run(host="localhost", port=8000, debug=True)
Comment

run flask app on a different port

flask run -h localhost -p 3000 #3000 is the port number you want your flask app to run on
Comment

flask give port number

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=80)
Comment

how to change port in flask app

if __name__ == "__main__":
    app.run(host='127.0.0.1', port=5002)
Comment

flask port

from flask import Flask

app = Flask(__name__)

if __name__ == '__main__':
      app.run(port=80)

# Also make sure that nothing else is running on port 80
Comment

how to change port in flask app

flask run -h localhost -p 3000
Comment

PREVIOUS NEXT
Code Example
Python :: django apiview pagination 
Python :: Error: The file/path provided (flaskr) does not appear to exist. Please verify the path is correct. If app is not on PYTHONPATH, ensure the extension is .py 
Python :: create new column pandas lambda function assign apply 
Python :: python download file from url requests 
Python :: how to get prime numbers in a list in python using list comprehension 
Python :: python cli click 
Python :: Python string to var 
Python :: python last 3 list elements 
Python :: decimal to octal in python 
Python :: delete element list python 
Python :: uploading folder in google colab 
Python :: python index 2d array 
Python :: how to get all possible combinations in python 
Python :: python combine two lists into matrix 
Python :: factorial of a number in python 
Python :: python arrays 
Python :: subset a list python 
Python :: python regex search file 
Python :: import class in python 
Python :: python nominatim get latitude from address 
Python :: Iniciar servidor en Django 
Python :: python dictionary append value if key exists 
Python :: ffill python 
Python :: trim string python 
Python :: represent NaN with pandas in python 
Python :: drop first column read_csv 
Python :: insert row in any position pandas dataframe 
Python :: concat string columns in pandas 
Python :: use of kwargs and args in python classes 
Python :: one hot numpy 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =