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? ðŸ«
34 Replies
Project ID:
N/A
N/A
You can use Vercel / Render / CF Pages for hosting static pages
on railway?
Wait why vercel and render
dont know why they offer that as a solution, you are asking about railway
Yep, I have few static sites that i gotta host with a custom domain
Solution
you should be able to put your site files in a
public
folderunless you have a node project that generates static files with react, thats a while different topic
no react really
like really nothing
This is my structure atm
just put them all in a public folder
I didn't get you?
does it work similar to github pages, i dont have to specify anything?
it should be auto detected as long as your site files are in a
public
folderAlright, I will try that, also for a route /about is it like ?
Brody, i think he litteraly has raw HTML, and JS files it seems. no build step.
i know
erm Exactly
put everything into a public folder, im not sure how i could clarify this statement further
but on railway we cannot host static files directly, without running any server.
whats wrong with running a server?
Alright so I did
And generated a domain on port 8080
But I can't really load it?
please provide specific errros
a link to the service would be best
there's no errors on log
just this
^
Nevermind my bad
Its up now
Maybe it took time, thanks tho
no problem
And one more
How much resources does static usually take up?
not sure, check your metrics often
Alright gotcha then
Well it shows an estimated 28$ 💀
where does it say that
let it run for some time, it will adjust