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
Project ID:
N/A
N/A
share your repo?
https://github.com/maxralph01/faansy-client
You can ask me questions for quicker understanding of the project
its private
OH
Use this
They're same
GitHub
GitHub - maxralph1/faansy-client
Contribute to maxralph1/faansy-client development by creating an account on GitHub.
Please, use this
There was an error from me on the URL
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.
OK
Done. I'll try it out using BrowserRouter on production and I'll get right back to you.
sounds good
Thanks
Is working
awesome
Now, I have 2 more problems to solve
what would those be
1. The server-side
2. The database
Perhaps, we go one after the other
1. deploy it on railway
2. deploy it on railway
server first
I have
what problems would you be running into?
The problem is that as a PHP app, there is a server limit for file upload size
did you open a help station thread about that?
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?
oh wow then someone else opened a thread in the last several hours for the same thing
Ah OK
this thread is good, no need for more threads just wonder if that thread I mentioned was you or not
Ah ok
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
I understand
I can wait
Or we deal with the database first?
sure! what's the issue there?
I would like to have momentary backup emailed as a mysql file to an email
honestly not a good idea at all
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?
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
I'm wondering how? Because I just recently used MySQL workbench for a DB schema
I have always used PHPMyAdmin
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
OK
I have just seen it too
Thanks
I will try it out
Then, for the server and the file upload size adjustment
just make sure you have deployed the database, frontend, and backend all into the same railway project
OK
will search for that when I'm back at my computer, whats the max size limit you could ever need?
do you?
2MB for images, 10MB for videos
Yes
there would be no way to differentiate between the two, so I'll set it to 50MB, would that be good?
Ok
That would be ok
okay, I'll get back to you on that then
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
we don't delete or even close threads
OK
place these two files into the root of your project
Ok. Thanks
I see only 1 file
i have sent two files
But 2 settings
OK
I'll place them now and get back to you
sounds good
It is working perfectly now
awsome!
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
you just want a place to store photos and videos?
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
why not store files in a volume?
oh you said external
cloudflare r2?
Honestly, I do not know about volume
OK. Is it free?
i think the first 10gb is free, but you will need to fact check that
OK
Thanks. I will.
okay so whats the issue with the database?
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
there is this template, never used it myself though
https://railway.app/template/d8hqEm
OK
AH OK
make sure you use the private database host and port
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.
sounds good
Still on it.
Will keep you posted.
Life problems got in the way.
Thanks for the patience.
no worries