Railway postgres connection to vercel front-end
0xmemeterminal
TRIALOP

a year ago

Hi guys ! Sorry for the noob question…

I have set up a postgresql on railway and I would like to connect it to my vercel front-end.

I have a question for the environment variable :

datasource db {
provider = "postgresql"
url = env("DATABASEURL") directUrl = env("DIRECTURL")
}

For the variables, should I use the DATABASEPUBLICURL proxied env from Railway or I need to create a custom domain in the Settings -> Networking -> Public Networking

Thank you for your help 🙂

5 Replies

0xmemeterminal
TRIALOP

a year ago

N/A


a year ago

Since your frontend is on vercel and not on railway, u will need to use the public URL


a year ago

That will make your project get some egress fees though, since they aren't on the same private network.


0xmemeterminal
TRIALOP

a year ago

thank you for your reply, I'll try it 🙂


a year ago

may I ask why not run your frontend on railway too?


Loading...