I'm deploying a flask server to a Digital Ocean droplet.
from flask import Flask
app = Flask(__name__)
@app.route("/a/<string:b>")
def deploy(b):
return "Response"
Using the following command:
FLASK_APP=server.py python -m flask run --host=0.0.0.0 --port=5555
When I deploy the application locally, I can receive response by doing
curl -XGET localhost:5555/a/random
When deploying on the droplet, it works internally, but when calling the droplet externally (despite having exposed port 5555 on TCP) it does not connect.
What could have changed? I'm also deploying a flask graphql server on the same droplet via docker which works perfectly fine.
from Flask application cannot be exposed on droplet
No comments:
Post a Comment