Earlier quoted context omitted.
A URL shortener can be done with no database - I did it using only Lambda functions once, but I wouldn't recommend it. :) https://kevinkuchta.com/2018/03/lambda-only-url-shortener/
I've seen people suggest using pi as a "database." In this instance you could map ranges of pi to characters. Then you search pi until you find the right range. The URL would contain the range(s) needed. This is terrible and so computationally wasteful. But it's interesting to think about.
Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
151–160 of 182 posts
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#152I was expecting it to be a way of taking a URL and converting it to a base64 type of format that is stored on the "url" itself and decoded by a simple web page. I have wanted to try to do this for a while, but never saw down to look for an appropriate encoding that somehow also compresses. I helped someone design a regular URL shortener in PHP before, they're not complicated to implement with a simple MySQL (or even…
Base64 would probably be longer than the original URL. I can't really see how short pieces of text (like URLs) could be compressed to become smaller. That being said it's definitely a cool concept! I once worked on a code playground kinda thing for my school and there was a function to share the code written in a URL. How we did it was just to include the whole piece of code as a URL param in base64!
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#153Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#154You 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
#155Earlier quoted context omitted.
Just like serverless still has servers, this can be reasonably called dbless :)
Essentially this is the promise of the blockchain. Imagine one massive global database where anyone can store anything in encrypted form. Free, forever.
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#156Interesting. This could be considered as abuse of github issues though.
Yeah, this is like when people built filesystems on top of Gmail attachments in the bad old days before Dropbox.
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#157I 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…
"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." I felt exactly the same way and did, in fact, build one.[1] It was pretty simple. There's an interesting twist to the particular one I built - it's not specifically a URL shortener, it's a "Universal Shortener".[2] Also no…
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#158Earlier quoted context omitted.
Just like serverless still has servers, this can be reasonably called dbless :)
Essentially this is the promise of the blockchain. Imagine one massive global database where anyone can store anything in encrypted form. Free, forever.
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#159I 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…
"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." I felt exactly the same way and did, in fact, build one.[1] It was pretty simple. There's an interesting twist to the particular one I built - it's not specifically a URL shortener, it's a "Universal Shortener".[2] Also no…
Re: Show HN: I created a URL shortener that can be entirely hosted on GitHub Pages
#160Interesting take!