Hosting static pages on railway?
ritesh-chhetri
HOBBYOP

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

Closed

41 Replies

ritesh-chhetri
HOBBYOP

2 years ago

N/A


2 years ago

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


2 years ago

on railway?


ritesh-chhetri
HOBBYOP

2 years ago

Wait why vercel and render


2 years ago

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


ritesh-chhetri
HOBBYOP

2 years ago

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


2 years ago

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


2 years ago

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


ritesh-chhetri
HOBBYOP

2 years ago

no react really


ritesh-chhetri
HOBBYOP

2 years ago

like really nothing


ritesh-chhetri
HOBBYOP

2 years ago

This is my structure atm

1290721545026539581


2 years ago

just put them all in a public folder


ritesh-chhetri
HOBBYOP

2 years ago

I didn't get you?


ritesh-chhetri
HOBBYOP

2 years ago

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


2 years ago

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


ritesh-chhetri
HOBBYOP

2 years ago

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


2 years ago

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


2 years ago

i know


ritesh-chhetri
HOBBYOP

2 years ago

erm Exactly


2 years ago

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


2 years ago

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


2 years ago

whats wrong with running a server?


ritesh-chhetri
HOBBYOP

2 years ago

Alright so I did


ritesh-chhetri
HOBBYOP

2 years ago

And generated a domain on port 8080


ritesh-chhetri
HOBBYOP

2 years ago

But I can't really load it?


2 years ago

please provide specific errros


2 years ago

a link to the service would be best


ritesh-chhetri
HOBBYOP

2 years ago

there's no errors on log


ritesh-chhetri
HOBBYOP

2 years ago

just this

1290724270816624736


2 years ago

^


ritesh-chhetri
HOBBYOP

2 years ago

Nevermind my bad


ritesh-chhetri
HOBBYOP

2 years ago

Its up now


ritesh-chhetri
HOBBYOP

2 years ago

Maybe it took time, thanks tho


2 years ago

no problem


ritesh-chhetri
HOBBYOP

2 years ago

And one more


ritesh-chhetri
HOBBYOP

2 years ago

How much resources does static usually take up?


2 years ago

not sure, check your metrics often


ritesh-chhetri
HOBBYOP

2 years ago

Alright gotcha then


ritesh-chhetri
HOBBYOP

2 years ago

Well it shows an estimated 28$ 💀


2 years ago

where does it say that


2 years ago

let it run for some time, it will adjust


Welcome!

Sign in to your Railway account to join the conversation.

Loading...