Answer the question
In order to leave comments, you need to log in
Why does a file with a flask project need to be run from the command line?
I'm just starting to learn the Flask microframework.
I wrote the following code for testing:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
return 'hello, World'
# if __name__ == '__main__':
# app.run()
app.run()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question