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
Project ID:
499f4e8a-c36a-4e23-80f2-46f6785d1a5a
You might find these helpful:
- Error 503
- 404 Error
- Error: connect ETIMEDOUT when connecting to MySQL db in project
⚠️ experimental feature
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
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!
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
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
no problem, im happy to help!