full-stack-fastapi-template
full-stack-fastapi-template copied to clipboard
Question - Connect to existing database
Hi all,
Short question, what would be the best direction to use an existing postgres database on another server? Or should I not bother using this nice template.
Regards, Rob
maybe modifying in the content of full-stack-fastapi-postgresql/backend/app/app/db/session.py from
engine = create_engine(settings.SQLALCHEMY_DATABASE_URI, pool_pre_ping=True)
to
engine = create_engine("postgresql://"username:password@ip:port/db_name", pool_pre_ping=True)