Connecting a Supabase database to a Hostinger Node.js application

Connecting a Node.js application to a Supabase PostgreSQL database on Hostinger

Updated 1 day ago

This guide explains how to connect a Supabase project to a Node.js application hosted on Hostinger.

Before we start, ensure:

When using a third-party database provider (like Supabase), Hostinger supports Node.js applications to connect to externally hosted databases such as:

  • PostgreSQL

  • MySQL

  • MongoDB

If you’d rather use a MySQL database hosted directly on Hostinger instead of an external provider, see connecting a Hostinger MySQL database to a Node.js application.

Steps to connect Supabase database to Node.js website

  1. In hPanel, go to your Node.js application dashboard
  2. Under the Essentials section, find Database and click Connect
  3. Select Supabase and click Continue

  4. You will be redirected to Supabase to sign in to your account
  5. Once authorized, choose to either Connect an existing database or Create a new database

  6. If connecting to an existing database, select it from the list of your Supabase projects and click Continue
  7. Hostinger will automatically retrieve the required environment variables and apply them to your next deployment

 

Hostinger does not make any code changes to your application. Your website’s code and structure must already support the database you are connecting to. A reminder of this is also shown during the onboarding flow.

Congratulations, you’ve successfully connected your SupaBase external database to your Hostinger Node.js application.