Python Flask problem
Python Flask problem
Here's my code:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'hello!'
if __name__ == "__main__":
app.run(debug=True)
I thought when you run this it should have a new tab window and return 'hello'. But when I ran the code, all it did was show this:
* Serving Flask app "main" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 172-357-633
And it didn't have a new tab window. Don't judge me please, I'm still a noob at flask. So yeah.
Voters
ch1ck3n (1625)
can you make the repl public?
Replit requires that you run servers on the host 0.0.0.0, so replace the app.run() call with this:
thank U! @SixBeeps
@SixBeeps frick you beat me
lmao @ch1ck3n