How to connect Local Postgres database to Railway. Getting error 500

Hi everyone, please bear with me as I'm VERY new to this. I'm trying to deploy my project as I'm building the website. When I was just building out the frontend, it worked fine. But as soon as I start fetching data from my local db using axios, everything fell apart and I'm getting Error 500. ( see screenshot below) It 'appears' to work fine when I'm testing on my local server so I'm assuming the issue is with how railway deployed app is connected to the local db. I tried to find documentation on how to connect to the existing local db but couldn't find any. ( or I'm too new to understand it ) Can someone please help me? I really want to figure this out! project: 499f4e8a-c36a-4e23-80f2-46f6785d1a5a github: https://github.com/marchingkoala/Doggle
GitHub
GitHub - marchingkoala/Doggle
Contribute to marchingkoala/Doggle development by creating an account on GitHub.
7 Replies
Percy
Percy2y ago
Project ID: 499f4e8a-c36a-4e23-80f2-46f6785d1a5a
Percy
Percy2y ago
⚠️ experimental feature
Brody
Brody2y ago
you need to use a service like ngrok to expose the database to the internet, otherwise railway or any cloud service has no way of accessing a database thats running only within your internal network
marchingkoala
marchingkoalaOP2y ago
is there anyway to move data from my db to the railway's db? I saw that I could build one inside the railway but I don't want to start from the scratch i will go look at ngrok!
Brody
Brody2y ago
no no you are on the right track lookup dbgate, it can connect to your local database and export data to the database running on railway
marchingkoala
marchingkoalaOP2y ago
thank you Brody. I will look it up. So happy that I decided to ask this server because I've been struggling for few days
Brody
Brody2y ago
no problem, im happy to help!
Want results from more Discord servers?
Add your server