Re: [dev] running a shortlink provider

From: Marcel Plch <dormouse_AT_plch.xyz>
Date: Thu, 25 May 2023 07:02:25 +0200

On Thu, May 25, 2023 at 12:47:20AM -0300, Spenser Truex wrote:
> Hello,
>
> My internet friends and I have been wanting a shortlinks provider. How
> can I do this in a suckless way? I'd like to be able to host the
> shortlinks provider and easily let my friends point their own domains at
> my VPS.
>
> I used to just upload a HTML file with a redirect to the desired
> location in my webserver root. This doesn't work for a shared service
> though.
>
> There are a lot of bloated projects that I've found. Any suggestions?
>
>
> --
> CAEE B377 FC82 BAF9 102C D22F C5CE D003 1AA8 E281
> Spenser Truex https://equwal.com

1) VPS
2) Pick favorite Web stack
3) Make a website that takes the specified URL, stores the URL and its
   hash as a key-value pair (possibly in a database if that's suckless
   enough for you, directory+file structure is probably okay as well.)
4) Store the hash value in base64


I personally would go for Python/Django, I'm not sure how suckless that's
considered (probably not at all) but I found Django to be about the
least bloated fully functional web framework. Web is in a sad state so
I'm sure Unix gods are gonna reward you even if you write a minimalistic
web in Django.

Django also uses sqlite by default as a database backend, so it's not even
a glass cannon. It knows that unless you bother to set something up, you
probably don't need something special.


I'm sure this suggestion is going to be either extremely helpful or
upsetting. Let me know what you picked. ^_^
-- 
# Marcel Plch

Received on Thu May 25 2023 - 07:02:25 CEST

This archive was generated by hypermail 2.3.0 : Thu May 25 2023 - 07:12:08 CEST