Reputation: 54
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)
The error webpage looks like this
Upvotes: 0
Views: 348
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