Hosting static pages on railway?

ritesh-chhetriHOBBY

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

0 Replies

ritesh-chhetriHOBBY

8 months ago

N/A


8 months ago

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


8 months ago

on railway?


ritesh-chhetriHOBBY

8 months ago

Wait why vercel and render


8 months ago

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


ritesh-chhetriHOBBY

8 months ago

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


8 months ago

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


8 months ago

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


ritesh-chhetriHOBBY

8 months ago

no react really


ritesh-chhetriHOBBY

8 months ago

like really nothing


ritesh-chhetriHOBBY

8 months ago

This is my structure atm

1290721545026539500


8 months ago

just put them all in a public folder


ritesh-chhetriHOBBY

8 months ago

I didn't get you?


ritesh-chhetriHOBBY

8 months ago

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


8 months ago

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


ritesh-chhetriHOBBY

8 months ago

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


8 months ago

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


8 months ago

i know


ritesh-chhetriHOBBY

8 months ago

erm Exactly


8 months ago

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


8 months ago

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


8 months ago

whats wrong with running a server?


ritesh-chhetriHOBBY

8 months ago

Alright so I did


ritesh-chhetriHOBBY

8 months ago

And generated a domain on port 8080


ritesh-chhetriHOBBY

8 months ago

But I can't really load it?


8 months ago

please provide specific errros


8 months ago

a link to the service would be best


ritesh-chhetriHOBBY

8 months ago

there's no errors on log


ritesh-chhetriHOBBY

8 months ago

just this

1290724270816624600


8 months ago

^


ritesh-chhetriHOBBY

8 months ago

Nevermind my bad


ritesh-chhetriHOBBY

8 months ago

Its up now


ritesh-chhetriHOBBY

8 months ago

Maybe it took time, thanks tho


8 months ago

no problem


ritesh-chhetriHOBBY

8 months ago

And one more


ritesh-chhetriHOBBY

8 months ago

How much resources does static usually take up?


8 months ago

not sure, check your metrics often


ritesh-chhetriHOBBY

8 months ago

Alright gotcha then


ritesh-chhetriHOBBY

8 months ago

Well it shows an estimated 28$ 💀


8 months ago

where does it say that


8 months ago

let it run for some time, it will adjust


Hosting static pages on railway? - Railway Help Station