Hello. Made an elementary web application. Content:

enter image description here

Procfile content:

web: python test.py 

Content requirements.txt:

 flask==0.12.2 

Content test.py:

 #!/usr/bin/env python from flask import Flask app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello from Flask!' @app.route('/', methods=['POST']) def processing(): return 'ffffff' 

When switching to my "website" in the browser, the error is:

 Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. 

In the console, this is:

 2017-06-14T17:20:04.779480+00:00 heroku[web.1]: Starting process with command 'python test.py` 2017-06-14T17:20:06.120141+00:00 heroku[web.1]: Process exited with status 0 2017-06-14T17:20:06.131327+00:00 heroku[web.1]: State changed from starting to crashed 2017-06-14T17:20:06.131327+00:00 heroku[web.1]: State changed from crashed to starting 2017-06-14T17:20:10.233708+00:00 heroku[web.1]: Starting process with command 'python test.py` 2017-06-14T17:20:12.961724+00:00 heroku[web.1]: Process exited with status 0 2017-06-14T17:20:12.97S600+00:00 heroku[web.1]: State chan_ed from starting to crashed 2017-06-14T17:20:12.97S600+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=demydovbb.herokuapp.com request_id=0181r73r-6be1-4ba6-8b3r-10863d8r16ae rwd="188.166.78.22" dyno= connect= service= status=503 bytes= protocol=https 2017-06-14T17:20:12.97S600+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/ravicon.ico" host=demydovbb.herokuapp.com request_id=a534 _ 99-45eb-4076-abe2-6712b31017d0 rwd="188.166.78.22" dyno= connect= service= status=503 bytes= protocol=https 

What have I done wrong? Thank you in advance!

    1 answer 1

    Problem solved.

    It was necessary in the "Procfile" to register the launch of the application through gunicorn