Railway Specific Pattern to run React App without the trailing "#" from HashRouter

Hi everyone, Please help me with the Railway specific pattern of removing the trailing "#" in URLs whilst using HashRouter, because I want to switch to the cleaner BrowserRouter instead of HashRouter. Note that I am using HashRouter because the BrowserRouter was not working on production. @Brody proffered a solution using a ".toml" file on another user's thread, but I can't see the thread no more. Thanks.
69 Replies
Percy
Percy8mo ago
Project ID: N/A
maxralph01
maxralph01OP8mo ago
N/A
Brody
Brody8mo ago
share your repo?
maxralph01
maxralph01OP8mo ago
https://github.com/maxralph01/faansy-client You can ask me questions for quicker understanding of the project
Brody
Brody8mo ago
its private
maxralph01
maxralph01OP8mo ago
OH Use this They're same
maxralph01
maxralph01OP8mo ago
GitHub
GitHub - maxralph1/faansy-client
Contribute to maxralph1/faansy-client development by creating an account on GitHub.
maxralph01
maxralph01OP8mo ago
Please, use this There was an error from me on the URL
Brody
Brody8mo ago
https://github.com/brody192/vite-react-template copy the nixpacks.toml and Caddyfile from this repo into yours. if you have any build or start commands set in your service settings, remove them.
maxralph01
maxralph01OP8mo ago
OK Done. I'll try it out using BrowserRouter on production and I'll get right back to you.
Brody
Brody8mo ago
sounds good
maxralph01
maxralph01OP8mo ago
Thanks Is working
Brody
Brody8mo ago
awesome
maxralph01
maxralph01OP8mo ago
Now, I have 2 more problems to solve
Brody
Brody8mo ago
what would those be
maxralph01
maxralph01OP8mo ago
1. The server-side 2. The database Perhaps, we go one after the other
Brody
Brody8mo ago
1. deploy it on railway 2. deploy it on railway
maxralph01
maxralph01OP8mo ago
server first I have
Brody
Brody8mo ago
what problems would you be running into?
maxralph01
maxralph01OP8mo ago
The problem is that as a PHP app, there is a server limit for file upload size
Brody
Brody8mo ago
did you open a help station thread about that?
maxralph01
maxralph01OP8mo ago
I can adjust the size limit on my local machine. How do I readjust it on dev No Should I open a separate one for the 2?
Brody
Brody8mo ago
oh wow then someone else opened a thread in the last several hours for the same thing
maxralph01
maxralph01OP8mo ago
Ah OK
Brody
Brody8mo ago
this thread is good, no need for more threads just wonder if that thread I mentioned was you or not
maxralph01
maxralph01OP8mo ago
Ah ok
Brody
Brody8mo ago
I have an answer for both of you, but discord's search sucks so I haven't been able to find the pre-made solution just yet
maxralph01
maxralph01OP8mo ago
I understand I can wait Or we deal with the database first?
Brody
Brody8mo ago
sure! what's the issue there?
maxralph01
maxralph01OP8mo ago
I would like to have momentary backup emailed as a mysql file to an email
Brody
Brody8mo ago
honestly not a good idea at all
maxralph01
maxralph01OP8mo ago
Also, how can I access the database from the more familiar background like the MySQL workbench or something similar to PHPMyAdmin? Or how can I back up manually?
Brody
Brody8mo ago
you just simply use the credentials you are given when you deploy the database, nothing special you can do backups with mysql workbench as far as I'm aware
maxralph01
maxralph01OP8mo ago
I'm wondering how? Because I just recently used MySQL workbench for a DB schema I have always used PHPMyAdmin
Brody
Brody8mo ago
you are extremely overthinking this you deploy the database, and use it's provided credentials in mysql workbench, I promise you there is no more to it than that
maxralph01
maxralph01OP8mo ago
OK I have just seen it too Thanks I will try it out Then, for the server and the file upload size adjustment
Brody
Brody8mo ago
just make sure you have deployed the database, frontend, and backend all into the same railway project
maxralph01
maxralph01OP8mo ago
OK
Brody
Brody8mo ago
will search for that when I'm back at my computer, whats the max size limit you could ever need? do you?
maxralph01
maxralph01OP8mo ago
2MB for images, 10MB for videos Yes
Brody
Brody8mo ago
there would be no way to differentiate between the two, so I'll set it to 50MB, would that be good?
maxralph01
maxralph01OP8mo ago
Ok That would be ok
Brody
Brody8mo ago
okay, I'll get back to you on that then
maxralph01
maxralph01OP8mo ago
OK I'll wait And as a side note, please do not delete this thread as I could be needing it from time to time for the moment
Brody
Brody8mo ago
we don't delete or even close threads
maxralph01
maxralph01OP8mo ago
OK
Brody
Brody8mo ago
place these two files into the root of your project
maxralph01
maxralph01OP8mo ago
Ok. Thanks I see only 1 file
Brody
Brody8mo ago
i have sent two files
maxralph01
maxralph01OP8mo ago
But 2 settings OK I'll place them now and get back to you
Brody
Brody8mo ago
sounds good
maxralph01
maxralph01OP8mo ago
It is working perfectly now
Brody
Brody8mo ago
awsome!
maxralph01
maxralph01OP8mo ago
So, the next thing is the database Also, I feel this is beyond the scope of what I should ask you; but do you know of any solution to an external image/video upload source like AWS that is free That I can use with Laravel
Brody
Brody8mo ago
you just want a place to store photos and videos?
maxralph01
maxralph01OP8mo ago
CLOUDINARY isn't working. I am not getting the settings right Yes Because if I continue storing within the server, it would bloat out the application in time
Brody
Brody8mo ago
why not store files in a volume? oh you said external cloudflare r2?
maxralph01
maxralph01OP8mo ago
Honestly, I do not know about volume OK. Is it free?
Brody
Brody8mo ago
i think the first 10gb is free, but you will need to fact check that
maxralph01
maxralph01OP8mo ago
OK Thanks. I will.
Brody
Brody8mo ago
okay so whats the issue with the database?
maxralph01
maxralph01OP8mo ago
Then, for the database, I really need a backup Because this is a serious site That we intend to scale in the near future So, if the backup can be momentary, that'd be great If it can be automated So that we do not get to lose user info
Brody
Brody8mo ago
there is this template, never used it myself though https://railway.app/template/d8hqEm
maxralph01
maxralph01OP8mo ago
OK AH OK
Brody
Brody8mo ago
make sure you use the private database host and port
maxralph01
maxralph01OP8mo ago
OK I will try it I will get back to you in a moment Thanks for the help. I tried uploading files. But they won't work with the configuration I used for the Cloudflare. However, I have another configuration I will try out tomorrow. But I must now go to sleep, because I am up early in the morning to go to a day job. I will give you an update within 24 hours.
Brody
Brody8mo ago
sounds good
maxralph01
maxralph01OP8mo ago
Still on it. Will keep you posted. Life problems got in the way. Thanks for the patience.
Brody
Brody8mo ago
no worries
Want results from more Discord servers?
Add your server