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
Needle
05/02/2022, 11:04 AM
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
silentworks
05/02/2022, 11:39 AM
What is DATABASE_URL? can you share your project code where the environment variable is being used
n
Needle
05/02/2022, 11:39 AM
aaaaeeee (2022-05-02)
s
silentworks
05/02/2022, 11:40 AM
You said you deployed to Netlify, do you mean using Netlify functions? or just the normal Netlify hosting?
a
aaaaeeee
05/02/2022, 11:42 AM
just normal Netlify hosting
environment variable in Netlify is this
DATABASE_URL=postgresql://postgres:@db.ukswauncitpaoeqscdjg.supabase.co:5432/postgres
s
silentworks
05/02/2022, 11:55 AM
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.