I'm trying to connect to my postgres server on PythonAnywhere from a flask app i'm making. Right now i've created a db on the server and have it running and have the following in my app:
app.config["SQLALCHEMY_DATABASE_URI"] = 'postgresql+psycopg2://<username>:<password>@<host>:<port>/<dbname>'
db = SQLAlchemy(app)
with all the values in <> filled out correctly. Yet when I try and go db.create_all() the server times out and i receive the error:
sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) could not connect to server: Operation timed out
Any help would be appreciated!