polukarp
polukarp

Reputation: 54

I can't run the Python Flask application, help needed

When I run this Flask application logs in console seem to be fine, but I cannot find my webpage by the default url. Error: Not Found The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again. I entered this URL : http://127.0.0.1:5000/ with the trailing slash. Any thoughts?

from flask import Flask

app = Flask(__name__)

@app.route('/')
def home():
    return "Hello, World! <h1>Hello, World!<h1>"

if __name__ == '__main__':
    app.run(debug = False)

code and console log are on this screenshot

The error webpage looks like this

Upvotes: 0

Views: 348

Answers (1)

Bayram_dev
Bayram_dev

Reputation: 21

As you can see in the screenshot, the webserver is running. Just go to your browser and type in the search bar:

localhost:5000

Upvotes: 1

Related Questions