Next.js Discord

Discord Forum

Supabase postgresql connection

Unanswered
Ferruginous Hawk posted this in #help-forum
Open in Discord
Ferruginous HawkOP
I had worked on a project over the weekend, and for dev running on localhost, I had set up postgresql on my Windows computer. CRUD api calls worked just as expected.

So I deployed on Vercel (and Netlify) and I can seem to set up Supabase postgresql database for the deployed app.

During troubleshooting, I was able to establish a connection between localhost:3000 and Supabase postgresql database. CRUD actions are made on Supabase database, not local db on Windows.

But Vercel (or Netlify) to Supabase still wouldn't work.

My build command is npx prisma migrate && npm run build

10 Replies

Ferruginous HawkOP
Well none.
GET api not returning any tests.
@Ferruginous Hawk GET api not returning any tests.
vercel has logs tab, open that and see if there are any errors
Ferruginous HawkOP
@Ferruginous Hawk Click to see attachment
click on one of the log
it should expand
Ferruginous HawkOP
It did.
Ferruginous HawkOP
Just wondering, do I need to include the host in the fetch?

And I also tried checking ${host}/api/tests in browser.

{
  "message": "Database connection failed. Ensure the database is running."
}