How to Connect an External Database with Supabase

Connecting an External Database

To connect to an external database management system (DBMS), you need to meet the following prerequisites:

  1. You must have an account on supabase.com.
  2. You must already have a project on flatlogic.com that is in an active status.
  3. A repository for the project must be created on GitHub.

Once these requirements are met, log in to your Supabase account and click the Connect button.

Скриншот

In the window that opens, locate the Transaction Pooler section. Expand the View Parameters option.

Скриншот

Next, navigate to your project's repository. In the file backend/src/db/db.config.js, make the following changes.

In the parameters of the selected environment, update the following:

  • username – copy the value from the user field.
  • password – enter the password you set during registration on Supabase.
  • host – copy the value from the host field.
  • port – copy the value from the port field.

Скриншот

Commit the changes to your repository. Then, navigate to your project on Flatlogic and initiate a deployment.

After a successful deployment, you will be able to view the connected database in Supabase.

Скриншот