Connecting a Supabase Database to a Hostinger Node.js Application

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

Updated 4 weeks ago

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

Before we start, ensure:

  • You already have a built Node.js application

  • Your database is hosted on Supabase (third-party provider)

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


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

 

Note: 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.