Mattias
10/20/2021, 12:39 PMpg
! Would you mind sharing an example of a connection with Supabase. I keep getting Error: getaddrinfo ENOTFOUND https://lotsofletters.supabase.co
My code:
js
const pool = new Pool({
user: 'postgres',
host: import.meta.env.VITE_SUPABASE_URL,
database: 'postgres',
password: import.meta.env.VITE_SUPABASE_ANON_KEY,
port: 5432,
});
pool.query('SELECT NOW()', (err, res) => {
console.log(err, res)
pool.end()
})
silentworks
10/20/2021, 12:42 PMsilentworks
10/20/2021, 12:43 PMsilentworks
10/20/2021, 12:44 PMdb.[projectId].supabase.co
silentworks
10/20/2021, 12:44 PMScott P
10/20/2021, 1:28 PM[id].supabase.co
endpoint you'd use with the JS library routes to several different services, and none of them are a direct connection to the database, and none of them run on port 5432.