I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free. Thus, I wrote this URL shortener which does not need a backend to work at all. It uses GitHub issues as a "database", and unlike most other URL shorteners that do not need backends, this one doesn't need a # prefixed to the…
That’s clever! I once did the same, except I used a static site generator that I would push to Github and deploy on Netlify.
Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
11–20 of 182 posts
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#12Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#13https://github.com/nelsontky/gh-pages-url-shortener/blob/mai...
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#14It's so cool. I am using https://git.io as url shortener, and now this project makes me reconsider. What if some of shortener domain so popular that Github takes some action? Like block or ban?
Hopefully it wouldn’t be considered abuse just by its nature (as opposed to any traffic spikes it might cause). Quite the reverse, this shows off the flexibility of the service!
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#15Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#16I was always fixated with URL shorteners and always wanted to write one myself. While it would be easy to write one that works with a server, I loved the idea of hosting and running one for free. Thus, I wrote this URL shortener which does not need a backend to work at all. It uses GitHub issues as a "database", and unlike most other URL shorteners that do not need backends, this one doesn't need a # prefixed to the…
Looks nice and simple! Bit strange to claim "there is no database" and then add "GitHub issues is the database", maybe add "there is no traditional RDMS/document database needed" or something similar. You might want to detect infinite loops as well :) https://nlsn.cf/6 Last note, the status code seems to be incorrectly set to 404 instead of any of the redirection status code. If you're hosting it on GitHub pages, I'm…
Yep I actually cannot control the status code at all. Part of what made this a fun and hacky project was the fact that I was actually redirecting to the actual URLs by catching the 404s. So, the only way i could think of catching the infinite loop was to supply the domain. That being said, I do appreciate the feedback and it's always great to learn more!
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#17Interesting. This could be considered as abuse of github issues though.
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#18You could also push static HTML pages to the git root which have, e.g., https://news.ycombinator.com/ '" /> in the header.
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#19Interesting. This could be considered as abuse of github issues though.
GitHub does have a 60 calls per hour API limit so I don't think it affects them as much(?) That being said this project is meant to be for fun and definitely not recommended for production purposes HAHA