Railway postgres connection to vercel front-end
0xmemeterminal
TRIALOP

2 years 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("DATABASE_URL")

directUrl = env("DIRECT_URL")

}

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

Thank you for your help 🙂

Closed

5 Replies

0xmemeterminal
TRIALOP

2 years ago

N/A


2 years ago

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


2 years ago

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


0xmemeterminal
TRIALOP

2 years ago

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


2 years ago

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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...