I have a flask app
@app.route("/hello")
def generater():
     return "hello world"
if __name__ == '__main__':
    app.run()
My application runs fine, but i would like to know how I could make a request to http://127.0.0.1:5000/hello when I compile my code
You can use webbrowser to automatically open http://localhost:5000 in a web browser when running your flask app:
import webbrowser
...
if __name__ == '__main__':
    webbrowser.open('http://localhost:5000')
    app.run()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With