Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

chrispydizzle/lnkshrnk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linkshrink

linkshrink: A url shortner

  • naive implementation stores shortened urls in an in-memory dictionary
  • actually works.

Get code and run

gh repo clone chrispydizzle/lnkshrnk
cd lnkshrnk
pip install -r requirements.txt
flask run

Shrink something

curl http://localhost:5000/shrink -d '{ "url": "https://dogeplanet.com" }' -H 'Content-Type: application/json'
{
  "url": "http://localhost:5000/go/5fd5085c"
}

Unshrink something

Visiting the shrunken url will redirect you to the original url. But if you just want the original url

curl http://localhost:5000/unshrink -d '{ "url": "http://localhost:5000/go/5fd5085c" }' -H 'Content-Type: application/json'
{
  "url": "https://dogeplanet.com"
}

Time spent

wakatime

More Project Information

About

A url shortner

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages