/plushcap/analysis/fly-io/using-heroku-postgres-from-a-fly-app

Using Heroku Postgres From a Fly App

What's this blog post about?

The article demonstrates how to use Heroku's Postgres database with a native Fly application without migrating the entire application from Heroku to Fly. It provides step-by-step instructions on setting up a new Heroku app, installing add-ons like Postgres, obtaining credentials for the database, and configuring Sequelize in a Node.js application to connect to the Heroku Postgres database. The process involves parsing the connection string from Heroku, creating a Sequelize instance with SSL enabled, and passing the database URL as a secret to the Fly deployment. This method allows users to take advantage of Heroku's database services while deploying their applications on Fly for better performance and proximity to end-users.

Company
Fly.io

Date published
Sept. 28, 2020

Author(s)
Dj Walker-Morgan

Word count
912

Language
English

Hacker News points
None found.


By Matt Makai. 2021-2024.