Skip to content

alasleimi/lien

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lien - a link shortener

a Link shortener made during freecodecamp: project requirements page

live version on: https://lien.glitch.me

API

Create short links: https://lien.glitch.me/new/[original_url]

original_url must be a valid URL.

response:

{
 
 "short-url": SHORTURL,
 "original-url": ORIGINALURL
 
 }

example: https://lien.glitch.me/new/https://facebook.com

response:

{

"short_url":"C",
"original_url":"https://facebook.com"

}

short link: https://lien.glitch.me/C

in case of an invalid url: http status code 400

{
 
 "error": "unvalid URL"
 
 }

else http status code 500:

{
 
 "error": "database error"
 
 }

Front End

simple webpage that consumes the api. I used Storage API to save recently shortened links.

Releases

No releases published

Packages

No packages published