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

2 years ago

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.

<@539512869780455445> proffered a solution using a ".toml" file on another user's thread, but I can't see the thread no more.

Thanks.

115 Replies

maxralph1
TRIALOP

2 years ago

N/A


brody
EMPLOYEE

2 years ago

share your repo?



maxralph1
TRIALOP

2 years ago

You can ask me questions for quicker understanding of the project


brody
EMPLOYEE

2 years ago

its private


maxralph1
TRIALOP

2 years ago

OH


maxralph1
TRIALOP

2 years ago


maxralph1
TRIALOP

2 years ago

Use this


maxralph1
TRIALOP

2 years ago

They're same



maxralph1
TRIALOP

2 years ago

Please, use this


maxralph1
TRIALOP

2 years ago

There was an error from me on the URL


brody
EMPLOYEE

2 years ago

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.


maxralph1
TRIALOP

2 years ago

OK


maxralph1
TRIALOP

2 years ago

Done. I'll try it out using BrowserRouter on production and I'll get right back to you.


brody
EMPLOYEE

2 years ago

sounds good


maxralph1
TRIALOP

2 years ago

Thanks


maxralph1
TRIALOP

2 years ago

Is working


brody
EMPLOYEE

2 years ago

awesome


maxralph1
TRIALOP

2 years ago

Now, I have 2 more problems to solve


brody
EMPLOYEE

2 years ago

what would those be


maxralph1
TRIALOP

2 years ago

  1. The server-side


maxralph1
TRIALOP

2 years ago

  1. The database


maxralph1
TRIALOP

2 years ago

Perhaps, we go one after the other


brody
EMPLOYEE

2 years ago

  1. deploy it on railway

  2. deploy it on railway


maxralph1
TRIALOP

2 years ago

server first


maxralph1
TRIALOP

2 years ago

I have


brody
EMPLOYEE

2 years ago

what problems would you be running into?


maxralph1
TRIALOP

2 years ago

The problem is that as a PHP app, there is a server limit for file upload size


brody
EMPLOYEE

2 years ago

did you open a help station thread about that?


maxralph1
TRIALOP

2 years ago

I can adjust the size limit on my local machine. How do I readjust it on dev


maxralph1
TRIALOP

2 years ago

No


maxralph1
TRIALOP

2 years ago

Should I open a separate one for the 2?


brody
EMPLOYEE

2 years ago

oh wow then someone else opened a thread in the last several hours for the same thing


maxralph1
TRIALOP

2 years ago

Ah OK


brody
EMPLOYEE

2 years ago

this thread is good, no need for more threads just wonder if that thread I mentioned was you or not


maxralph1
TRIALOP

2 years ago

Ah ok


brody
EMPLOYEE

2 years 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


maxralph1
TRIALOP

2 years ago

I understand


maxralph1
TRIALOP

2 years ago

I can wait


maxralph1
TRIALOP

2 years ago

Or we deal with the database first?


brody
EMPLOYEE

2 years ago

sure! what's the issue there?


maxralph1
TRIALOP

2 years ago

I would like to have momentary backup emailed as a mysql file to an email


brody
EMPLOYEE

2 years ago

honestly not a good idea at all


maxralph1
TRIALOP

2 years ago

Also, how can I access the database from the more familiar background like the MySQL workbench or something similar to PHPMyAdmin?


maxralph1
TRIALOP

2 years ago

Or how can I back up manually?


brody
EMPLOYEE

2 years ago

you just simply use the credentials you are given when you deploy the database, nothing special


brody
EMPLOYEE

2 years ago

you can do backups with mysql workbench as far as I'm aware


maxralph1
TRIALOP

2 years ago

I'm wondering how? Because I just recently used MySQL workbench for a DB schema


maxralph1
TRIALOP

2 years ago

I have always used PHPMyAdmin


brody
EMPLOYEE

2 years ago

you are extremely overthinking this


brody
EMPLOYEE

2 years ago

you deploy the database, and use it's provided credentials in mysql workbench, I promise you there is no more to it than that


maxralph1
TRIALOP

2 years ago

OK


maxralph1
TRIALOP

2 years ago

I have just seen it too


maxralph1
TRIALOP

2 years ago

Thanks


maxralph1
TRIALOP

2 years ago

I will try it out


maxralph1
TRIALOP

2 years ago

Then, for the server and the file upload size adjustment


brody
EMPLOYEE

2 years ago

just make sure you have deployed the database, frontend, and backend all into the same railway project


maxralph1
TRIALOP

2 years ago

OK


brody
EMPLOYEE

2 years ago

will search for that when I'm back at my computer, whats the max size limit you could ever need?


brody
EMPLOYEE

2 years ago

do you?


maxralph1
TRIALOP

2 years ago

2MB for images, 10MB for videos


maxralph1
TRIALOP

2 years ago

Yes


brody
EMPLOYEE

2 years ago

there would be no way to differentiate between the two, so I'll set it to 50MB, would that be good?


maxralph1
TRIALOP

2 years ago

Ok


maxralph1
TRIALOP

2 years ago

That would be ok


brody
EMPLOYEE

2 years ago

okay, I'll get back to you on that then


maxralph1
TRIALOP

2 years ago

OK


maxralph1
TRIALOP

2 years ago

I'll wait


maxralph1
TRIALOP

2 years ago

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
EMPLOYEE

2 years ago

we don't delete or even close threads


maxralph1
TRIALOP

2 years ago

OK


brody
EMPLOYEE

2 years ago

place these two files into the root of your project

1228041434754711742
1228041435119620267


maxralph1
TRIALOP

2 years ago

Ok. Thanks


maxralph1
TRIALOP

2 years ago

I see only 1 file


brody
EMPLOYEE

2 years ago

i have sent two files


maxralph1
TRIALOP

2 years ago

But 2 settings


maxralph1
TRIALOP

2 years ago

OK


maxralph1
TRIALOP

2 years ago

I'll place them now and get back to you


brody
EMPLOYEE

2 years ago

sounds good


maxralph1
TRIALOP

2 years ago

It is working perfectly now


brody
EMPLOYEE

2 years ago

awsome!


maxralph1
TRIALOP

2 years ago

So, the next thing is the database


maxralph1
TRIALOP

2 years ago

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


maxralph1
TRIALOP

2 years ago

That I can use with Laravel


brody
EMPLOYEE

2 years ago

you just want a place to store photos and videos?


maxralph1
TRIALOP

2 years ago

CLOUDINARY isn't working. I am not getting the settings right


maxralph1
TRIALOP

2 years ago

Yes


maxralph1
TRIALOP

2 years ago

Because if I continue storing within the server, it would bloat out the application in time


brody
EMPLOYEE

2 years ago

why not store files in a volume?


brody
EMPLOYEE

2 years ago

oh you said external


brody
EMPLOYEE

2 years ago

cloudflare r2?


maxralph1
TRIALOP

2 years ago

Honestly, I do not know about volume


maxralph1
TRIALOP

2 years ago

OK. Is it free?


brody
EMPLOYEE

2 years ago

i think the first 10gb is free, but you will need to fact check that


maxralph1
TRIALOP

2 years ago

OK


maxralph1
TRIALOP

2 years ago

Thanks. I will.


brody
EMPLOYEE

2 years ago

okay so whats the issue with the database?


maxralph1
TRIALOP

2 years ago

Then, for the database, I really need a backup


maxralph1
TRIALOP

2 years ago

Because this is a serious site


maxralph1
TRIALOP

2 years ago

That we intend to scale in the near future


maxralph1
TRIALOP

2 years ago

So, if the backup can be momentary, that'd be great


maxralph1
TRIALOP

2 years ago

If it can be automated


maxralph1
TRIALOP

2 years ago

So that we do not get to lose user info


brody
EMPLOYEE

2 years ago

there is this template, never used it myself though


maxralph1
TRIALOP

2 years ago

OK


maxralph1
TRIALOP

2 years ago

AH OK


brody
EMPLOYEE

2 years ago

make sure you use the private database host and port


maxralph1
TRIALOP

2 years ago

OK


maxralph1
TRIALOP

2 years ago

I will try it


maxralph1
TRIALOP

2 years ago

I will get back to you in a moment


maxralph1
TRIALOP

2 years ago

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
EMPLOYEE

2 years ago

sounds good


maxralph1
TRIALOP

2 years ago

Still on it.
Will keep you posted.
Life problems got in the way.
Thanks for the patience.


brody
EMPLOYEE

2 years ago

no worries


Loading...