> GitHub as a file server

GitHub as a file server

So, I had this idea, GitHub pages is intended to host static websites for documentation and so forth, but, the thing is, in reality, it's just a simple read-only file server. It's given a URL which it replies to with a file in the repository. Other than some shortcuts to make it so index.html files are served more easily, it's just a regular file server.

This got me thinking, I could use GitHub as a Maven repo in that case, since at it's core, a Maven repo is just a read-only file server that hosts jars and xml files that are related to something.

Turns out, not that hard to set it up, so I did, at libraries.juliewoolie.com. Only issue as well is that most Maven repositories let you index through them. Not a problem! I just wrote a Deno script that goes through each folder and puts a index.html file in it that lists the contents of that folder. As long as that script is ran before a commit, we're good.

And the end result is a fully functional Maven repo. As for stuff like storage limits or rate limits or request limits or what have you, I don't know. So far, I've not encountered any issues!

This kinda made me realise how simple hosting a website is, all you need is something that returns files, and you're like 90% of the way there, and as long as there's no money being ran through it, it's free as well! Granted, some might need to run server side code, but, in most cases, I don't think an average person does.