I set up nextjs, prisma and supabase. when you sta...
# help
a
I set up nextjs, prisma and supabase. when you start local project connection to database works nicely. When I deploy it to Netlify the connection does not work , I have added DATABASE_URL to enviroment Should there be something else that I should be aware of?
n
Hello @aaaaeeee! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User role so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the /title command! We have solved your problem? Click the button below to archive it.
s
What is DATABASE_URL? can you share your project code where the environment variable is being used
n
aaaaeeee (2022-05-02)
s
You said you deployed to Netlify, do you mean using Netlify functions? or just the normal Netlify hosting?
a
just normal Netlify hosting environment variable in Netlify is this DATABASE_URL=postgresql://postgres:@db.ukswauncitpaoeqscdjg.supabase.co:5432/postgres
s
You can't use Prisma on normal hosting (normal hosting is static sites only). Prisma requires a server with NodeJS as its server-side code.
You'd need to follow this guide in order to get it to work https://www.prisma.io/docs/guides/deployment/deployment-guides/deploying-to-netlify
n
Thread was archived by @aaaaeeee. Anyone can send a message to unarchive it.