SupabaseS
Supabase5mo ago
b

Not connecting to my database? Timeout error

First time using supabase.
I dont understand why but i cant connect to my db. I don't think its the code since the command
nc -vz db.v.supabase.co 5432

yields me
nc: connect to db.v.supabase.co (7#.2##.1##.2##) port 5432 (tcp) failed: Connection timed out

No resrtcitions are applied to my db settings
I have enforce ssl also turned off.

But just incase my code is:
export const AppDataSource = new DataSource({
  type: 'postgres',
  url: process.env.DATABASE_URL, //postgres://postgres:mypassword@db.v.supabase.co:5432/postgres
  synchronize: true, 
  logging: true,
  entities: ['src/types/**/*.ts'],
});
which is placed in a file called db.ts which is what is used to make the connection.

im almost 90% sure its my database settings that are messing me up but idk what.
Was this page helpful?