Permalink
Browse files

Merge pull request #21 from Parth/patch-1

Update README.md
  • Loading branch information...
schme16 committed Jul 28, 2017
2 parents d8d9cf1 + 618295a commit 3cddfca90c2fbc72a8d10a8fdc70a00cd643d1e2
Showing with 12 additions and 12 deletions.
  1. +12 −12 README.md
View
@@ -2,10 +2,10 @@
A CDN for raw.githubusercontent.com content, that always links to the latest version (aka your master branch).
Built on NodeJS for rock solid delivery!
##Build Status
## Build Status
[![wercker status](https://app.wercker.com/status/3bd39472bd17b07fe55170316d6a8fbf/m "wercker status")](https://app.wercker.com/project/bykey/3bd39472bd17b07fe55170316d6a8fbf)
##How to use
## How to use
* Visit: https://gitcdn.xyz and paste your raw GitHub link into the field
**or**
@@ -15,32 +15,32 @@ Built on NodeJS for rock solid delivery!
2. **[Get latest commit]** Replace `https://raw.githubusercontent.com/` with `https://gitcdn.xyz/repo/` and switch the commit from /master/ or /{TAG}/ to your designed commit sha1 **Example:** `https://gitcdn.xyz/repo/schme16/gitcdn.xyz/master/README.md` or `https://gitcdn.xyz/repo/schme16/gitcdn.xyz/v1.0.2/README.md`
**[Get specific commit]** Replace `https://raw.githubusercontent.com/` with `https://gitcdn.xyz/cdn/` **Example:** `https://gitcdn.xyz/cdn/schme16/gitcdn.xyz/b5ccbec532d3cfe7eb9dec60b95317654a1be09f/README.md`
##How much does GitCDN cost?
## How much does GitCDN cost?
GitCDN is TOTALLY FREE!
That's not to say I won't have plans that have a monthly/yearly price in the future, but the repo CDN service will ALWAYS be free, without the need for sign-up!
##Want to buy me a coffee?
## Want to buy me a coffee?
This service is totally free, but is made possible with donations from awesome people like you!
If you'd like to show your thanks, please consider making a [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XHCYVRJHZ9XYN)!
[![Donate via Paypal](https://www.paypalobjects.com/en_AU/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=XHCYVRJHZ9XYN)
##So how does GitCDN work?
## So how does GitCDN work?
GitCDN works by creating a short-cached (~2 hours cache time) lookup of the latest commit of the specified file, then redirecting you to a long-cached (~1 week cache time on edge servers, and ~1 year cache time on primary servers) version of that file.
##Do I always have to use the latest commit?
## Do I always have to use the latest commit?
Nope!
See point #2 in the [How to use](#how-to-use) section above. But basically you just use /cdn/ instead of /repo/ and use a commit hash instead of `master`.
##Can I manually flush the cache?
## Can I manually flush the cache?
No.
Whilst theoretically an API could be added to allow you to request a cache flush of your item, the current implementation of caching via a redirect page that only caches for ~2 hours makes the necessity of this lower, but the server load exponentially higher. Feel free to still [submit it as a feature request/pull request](https://github.com/schme16/gitcdn.xyz/issues/new)
##How is this Different from [RawGit.com](https://rawgit.com) and [githack.com](https://raw.githack.com/)
## How is this Different from [RawGit.com](https://rawgit.com) and [githack.com](https://raw.githack.com/)
The main difference, is our focus on providing the **latest** commit of a given GitHub file, where as RawGit has more of a focus on providing **specific commits** and githack with efficient serving (they use nginx).
Each of the services mentioned above are awesome, and I'd like to thank the developers behind each for creating such brilliant services; but both are built with a bit of a glass jaw, that is, that users can either *accidentally*, or worse, **deliberately** cripple their services just through normal usage. My aim was to build GitCDN with a focus on preventing that being available to end users, and we achieve this through clever tweaks on Cloudflare that mean that at most a file will be hard accessed (accessed without a cache copy, directly from my servers) once per region/2hrs.
@@ -58,21 +58,21 @@ The advantage of these differences is that, while not providing promises about u
I've been using Cloudflare for a several years and have been more than happy with their service, but for a broader opinion you can see a pretty good write-up by [Kevin Muldoon](http://www.kevinmuldoon.com/), [Cloudflare vs MaxCDN](http://winningwp.com/cloudflare-vs-maxcdn/), which covers each of their strengths pretty nicely, and for more details about RawGit please see their [FAQ](https://rawgit.com/faq)
##Does this mean I can host a website straight from GitHub?
## Does this mean I can host a website straight from GitHub?
Almost, you can certainly host all of your files here, then link them in the index of your website!
##Plans for the future
## Plans for the future
- Better (Re: any) website front-page; I love how easy RawGit made their URL helper, so I will be including something similar ASAP!
- My goal is to add the ability to host your static website directly from your GitHub repo, with CNAME support for custom domains. There's no time-line for completion, but I'm super keen to make it happen (For free, of course).
- There are also still plenty of optimizations to do; but this service is definitely ready for production.
##Have an issue, idea or feedback?
## Have an issue, idea or feedback?
Great! We love hearing from you, just visit [https://github.com/schme16/gitcdn.xyz/issues/new](https://github.com/schme16/gitcdn.xyz/issues/new) and submit your great idea/annoying bug/awesome feedback!
##Acknowledgments & Background
## Acknowledgments & Background
The inspiration for this whole project comes from [RawGit](https://rawgit.com/) from [Ryan Grove](http://wonko.com/)
I absolutely love the service that Ryan has made available, and have used it for quite a while with great results! However the more I used it, the more I realized I needed to be able to get the latest version of a file, without having to change all of my links in README's and HTML pages, and so GitCDN was born!

0 comments on commit 3cddfca

Please sign in to comment.