Can't run default flask example

Hey, I have a problem running the standard python flask programme. When I click on start I only get “Page not found” in the webview

from flask import Flask

app = Flask(__name__)


@app.route('/')
def index():
    return 'Hello from Flask!'


app.run(host='0.0.0.0', port=81)

https://replit.com/@farbkeks/Mensa#main.py

2 Likes

Replit uses port 80 by default set port to 80 and it should work :slight_smile:

:wave: Welcome @farbkeks!

Can you send a screenshot of the entire webview tab?


This should not have an effect on a “Page not found” error.

There’s nothing wrong with your code. This is a replit issue. I forked the repl and the code itself works perfectly fine. When you say you clicked on “start”, is that a button? Could you send a screenshot of the thing that says start?

2 Likes

I think they meant the run button.