title: How to deploy a FastAPI app using PostgreSQL as a database on Heroku
body: <p>I developed a FastAPI app in a Virtual Environment using an SQLite database but deployed it on Heroku with a PostgresSQL database on Heroku as suggested in the <a href="https://fastapi.tiangolo.com/tutorial/sql-databases/" rel="nofollow noreferrer">tutorial</a>. Although it worked on my PC, adding PostegresSQL as an addon &amp; replacing the value of <code>SQLALCHEMY_DATABASE_URL</code> in the <code>database.py</code> broke everything. Note that I've properly frozen the dependencies on the <code>requirements.txt</code> file. Yet I can't figure out what went wrong.</p>
  <p>For further clarification, I've pushed my code to GitHub &amp; it can be accessed at this repository - <a href="https://github.com/mrk24251/Self_calculation" rel="nofollow noreferrer">Self_calculation</a>.</p>