leaf
Connecting PostgresSQL <> DBGate - where to find the server url?
I am trying to connect DBGate to my PostgresSQL DB. Following what I have seen online on sites like answeroverflow, I have the following credentials filled:
- server: ???
- port:
5432
- user : railway
- password: $PGPASSWORD
(value of this env variable)
- default database: (blank)
I am not sure which server url to use. I have tried the following but all do not work:
- public networking url: roundhouse.proxy.rlwy.net:NNNNN (where NNNNN is a port number)
- $DATABASE_URL
- $DATABASE_PRIVATE_URL
- my website domain name
In other examples online, I see medium articles and such that find the server url in the Connections tab, but this tab no longer exists7 replies
is anyone getting timeout errors from the CLI?
When I try to run railway commands from the CLI, it just hangs and times out:
e.g.
railway run npm start
, railway login
, railway run npx ts-node [file_name].ts
, etc.
Is there a service interruption? I can't find news of it anywhere10 replies
How do you update the railway CLI?
My railway CLI is out of date. How do I update? There is no command to do so here: https://docs.railway.app/reference/cli-api
17 replies
Best practice for uploading images or files - React + Express stack
Hi there, a bit of a noob and maybe silly question (and I could not find a a resource that discussed this) but is there a best practice for where and to upload images using React+Express+Railway?
My folder structure is:
Right now, when someone uploads a file, it is saved in
/client/public/avis
. While this works in dev, I realized it doesn't work in prod since I need to make a build each time I want the new pics to be actually uploaded.
My proposed solution is that I instead save the files in /client/build/avis/
but I am a bit unsure of this for the following reasons:
1. I don't know if I can persist the data between the railway container(?) and my local machine if I want to make changes to the code
2. I anticipate that then making changes in the dev environment would get a bit sloppy, conceptually speaking because I will now need to manage assets between /client/public/
and /client/build/
. It just seems... wrong?
What is the best practice of where to store images that users can upload in a React+Express+Railway stack?6 replies