S
S
Sergey Ilyin2020-05-23 19:37:12
Flask
Sergey Ilyin, 2020-05-23 19:37:12

What could be the problem when running flask app?

We have a standard structure:

app/
__init__.py
routes.py
site.py

contents of
init.py files:

application = Flask(__name__)

from app import routes
if __name__ == '__main__':
    application.run(debug=True)


routes.py
from app import application
@application.route('/')
@application.route('/index.html')
def index():
    return render_template("index.html")


site.py
from app import application
application.run(debug=True, port=5000)


on startup it says:
* Serving Flask app "app" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on and not

a line about what port the server is running on (((

what could be the problem? the service is available on the port, however, when starting, the flask persistently does not want to give a reference to the port


Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question