R
Railway•2mo ago
gabchan

Hosting static pages on railway?

I'm trying to host a static web pages, the basic html css js thingies. Do I need to connect them to fastapi or something, or there's a better way? 🫠
Solution:
you should be able to put your site files in a public folder
Jump to solution
34 Replies
Percy
Percy•2mo ago
Project ID: N/A
gabchan
gabchanOP•2mo ago
N/A
Yashu
Yashu•2mo ago
You can use Vercel / Render / CF Pages for hosting static pages
Brody
Brody•2mo ago
on railway?
gabchan
gabchanOP•2mo ago
Wait why vercel and render
Brody
Brody•2mo ago
dont know why they offer that as a solution, you are asking about railway
gabchan
gabchanOP•2mo ago
Yep, I have few static sites that i gotta host with a custom domain
Solution
Brody
Brody•2mo ago
you should be able to put your site files in a public folder
Brody
Brody•2mo ago
unless you have a node project that generates static files with react, thats a while different topic
gabchan
gabchanOP•2mo ago
no react really like really nothing
gabchan
gabchanOP•2mo ago
This is my structure atm
No description
Brody
Brody•2mo ago
just put them all in a public folder
gabchan
gabchanOP•2mo ago
I didn't get you? does it work similar to github pages, i dont have to specify anything?
Brody
Brody•2mo ago
it should be auto detected as long as your site files are in a public folder
gabchan
gabchanOP•2mo ago
Alright, I will try that, also for a route /about is it like
about/index.html
about/index.html
?
Yashu
Yashu•2mo ago
Brody, i think he litteraly has raw HTML, and JS files it seems. no build step.
Brody
Brody•2mo ago
i know
gabchan
gabchanOP•2mo ago
erm Exactly
Brody
Brody•2mo ago
put everything into a public folder, im not sure how i could clarify this statement further
Yashu
Yashu•2mo ago
but on railway we cannot host static files directly, without running any server.
Brody
Brody•2mo ago
whats wrong with running a server?
gabchan
gabchanOP•2mo ago
Alright so I did And generated a domain on port 8080 But I can't really load it?
Brody
Brody•2mo ago
please provide specific errros a link to the service would be best
gabchan
gabchanOP•2mo ago
there's no errors on log
gabchan
gabchanOP•2mo ago
just this
No description
Brody
Brody•2mo ago
^
gabchan
gabchanOP•2mo ago
Nevermind my bad Its up now Maybe it took time, thanks tho
Brody
Brody•2mo ago
no problem
gabchan
gabchanOP•2mo ago
And one more How much resources does static usually take up?
Brody
Brody•2mo ago
not sure, check your metrics often
gabchan
gabchanOP•2mo ago
Alright gotcha then
gabchan
gabchanOP•2mo ago
Well it shows an estimated 28$ 💀
Brody
Brody•2mo ago
where does it say that
Medim
Medim•2mo ago
let it run for some time, it will adjust
Want results from more Discord servers?
Add your server