I'm writing a basic "Hello world" program in Flask which exits without giving any output. The following is my code:
import flask
app = flask.Flask(__name__)
@app.route("/")
def hello():
return "Hello World"
if __name__ == "main":
app.run(debug=True, host='0.0.0.0')
print("test")
I'm getting the following output:
Process finished with exit code 0
But my http server is not starting, I get the following output:
$ curl -I http://127.0.0.1:5000
curl: (7) Failed to connect to 127.0.0.1 port 5000: Connection refused