Small Utilities for a Small URL

mkl.ski is a simple website full of random utilities, which would otherwise be provided by third-party sites such as pastebin or tinyurl.

After finding that the domain was available, I could see the benefit of having a ‘personalized’ short URL service… So I bought the name and made it.


Features

  • URL shortener (ex: http://mkl.ski/u/abc123)
    • Expires after duration (if any)
  • Pastebin (ex: http://mkl.ski/s/abc123)
    • Markdown supported
    • /raw endpoint gives plaintext content
    • Can be curled from the command line!
    • Expires after duration (if any)
  • Image Host
    • Coming soon!

Technical Details

  • With the goal of speed in mind, I used redis for data storage.
    • Since strings are the only type of data being saved, it worked out well with redis’ key-value store.
    • Using redis also afforded pastes/URLs expirations which were trivial to implement.
    • The pastebin feature actually displays the time it took to load/render in the bottom right of the page!
  • Backend is super simple: node + redis
  • Frontend is a simple React app, using BlueprintJS for UI components.
    • Since this was a quick project, I didn’t care to spend much time building components.
    • Also, this was an opportunity for me to evaluate BlueprintJS.

Future Plans

  • Image Hosting
    • I’d like to add image hosting to the site, though that would require dealing with actually hosting images and so on.
  • Hosting the site locally
    • Currently, I use a simple (free tier) Heroku app.
    • I love the idea of using a Raspberry Pi to host the web server, and later the storage device(s) for image hosting.