from flask import Flask
app = Flask(__name__)
@app.route("/hello")
def hello():
return "<h1> Hello World! </h1>"
if __name__ == "__main__":
app.run()`
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 http://127.0.0.1:8080/ (Press CTRL+C to quit)
127.0.0.1 - - [26/Sep/2021 23:41:25] "GET / HTTP/1.1" 404 -
127.0.0.1 - - [26/Sep/2021 23:41:25] "GET /favicon.ico HTTP/1.1" 404 -
This is the only result.
python flask
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
578 Understanding How to Configure Google API Key
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
915 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.