Share your repls and programming experiences

← Back to all posts
URL Shortener
gad0003 (0)

Simple URL shortener that works with the database, so doesn't need to be on all the time.

URLs can be created and listed at this time.

Environment variables

  • DROP_KEY - Key to authorize operations such as key validation override and database drop.

HTTP paths

  • /[id] - Go to shortlink via ID
  • /[id]/stats - See shortlink statistics.
  • /n - Create a new shortlink. Takes parameters url, id and json
  • /l - List all shortlinks.
  • /l.[csv/json] - Export shortlinks list.