Hosting static pages on railway?
ritesh-chhetri
HOBBYOP

a year ago

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? 🫠

41 Replies

ritesh-chhetri
HOBBYOP

a year ago

N/A


a year ago

You can use Vercel / Render / CF Pages for hosting static pages


a year ago

on railway?


ritesh-chhetri
HOBBYOP

a year ago

Wait why vercel and render


a year ago

dont know why they offer that as a solution, you are asking about railway


ritesh-chhetri
HOBBYOP

a year ago

Yep, I have few static sites that i gotta host with a custom domain


a year ago

you should be able to put your site files in a public folder


a year ago

unless you have a node project that generates static files with react, thats a while different topic


ritesh-chhetri
HOBBYOP

a year ago

no react really


ritesh-chhetri
HOBBYOP

a year ago

like really nothing


ritesh-chhetri
HOBBYOP

a year ago

This is my structure atm

1290721545026539500


a year ago

just put them all in a public folder


ritesh-chhetri
HOBBYOP

a year ago

I didn't get you?


ritesh-chhetri
HOBBYOP

a year ago

does it work similar to github pages, i dont have to specify anything?


a year ago

it should be auto detected as long as your site files are in a public folder


ritesh-chhetri
HOBBYOP

a year ago

Alright, I will try that, also for a route /about is it like about/index.html?


a year ago

Brody, i think he litteraly has raw HTML, and JS files it seems. no build step.


a year ago

i know


ritesh-chhetri
HOBBYOP

a year ago

erm Exactly


a year ago

put everything into a public folder, im not sure how i could clarify this statement further


a year ago

but on railway we cannot host static files directly, without running any server.


a year ago

whats wrong with running a server?


ritesh-chhetri
HOBBYOP

a year ago

Alright so I did


ritesh-chhetri
HOBBYOP

a year ago

And generated a domain on port 8080


ritesh-chhetri
HOBBYOP

a year ago

But I can't really load it?


a year ago

please provide specific errros


a year ago

a link to the service would be best


ritesh-chhetri
HOBBYOP

a year ago

there's no errors on log


ritesh-chhetri
HOBBYOP

a year ago

just this

1290724270816624600


a year ago

^


ritesh-chhetri
HOBBYOP

a year ago

Nevermind my bad


ritesh-chhetri
HOBBYOP

a year ago

Its up now


ritesh-chhetri
HOBBYOP

a year ago

Maybe it took time, thanks tho


a year ago

no problem


ritesh-chhetri
HOBBYOP

a year ago

And one more


ritesh-chhetri
HOBBYOP

a year ago

How much resources does static usually take up?


a year ago

not sure, check your metrics often


ritesh-chhetri
HOBBYOP

a year ago

Alright gotcha then


ritesh-chhetri
HOBBYOP

a year ago

Well it shows an estimated 28$ 💀


a year ago

where does it say that


a year ago

let it run for some time, it will adjust


Loading...