I wrote basic code for Python flask, but I got 404 error

Asked 6 days ago, Updated 6 days ago, 1 views

from flask import Flask

app = Flask(__name__)
def hello():
    return "<h1> Hello World! </h1>"

if __name__ == "__main__":

Writing the following basic code does not run normally and results in a 404 error: I've been looking for it for two hours, but I don't know the reason, is there anyone who knows?

* Running on (Press CTRL+C to quit) - - [26/Sep/2021 23:41:25] "GET / HTTP/1.1" 404 - - - [26/Sep/2021 23:41:25] "GET /favicon.ico HTTP/1.1" 404 -

This is the only result.

python flask

2022-09-20 15:02

1 Answers

If you have any answers or tips

© 2022 pinfo. All rights reserved.