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

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 :: discord.py ping command 
Python :: df invert sort index 
Python :: python get ip info 
Python :: program to split the list between even and odd python 
Python :: how to move file from one location to another with python 
Python :: download stopwords nltk 
Python :: chiffre cesar python 
Python :: replace column values pandas 
Python :: lambda with two columns pandas 
Python :: my django template doesnt want to load the static file 
Python :: python pickle save and load multiple variables 
Python :: put array over array in numpy 
Python :: How to efficiently create a median finder for a stream of values, in Python? 
Python :: python spearman correlation 
Python :: datetime current year 
Python :: python square root of large number 
Python :: python create tuple from input 
Python :: how to rearrange list in python 
Python :: python filter list of int and strings 
Python :: python detect color on screen 
Python :: converting capital letters to lowercase and viceversa in python 
Python :: python json parse 
Python :: os run shell command python 
Python :: python bold text 
Python :: convert time zone pandas 
Python :: python get weather temperature 
Python :: write geopands into postgres python 
Python :: add padding to 2d matrix p 
Python :: loading text file delimited by tab into pandas 
Python :: standardscaler in machine learning 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =