Skip to content

mindplace/bitly_clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bitly clone: URL shortener

This lightweight API does only a couple actions: it can shorten a single url, shorten several urls at a time, showcase data on how many times a url has been used, and redirect the short url to the original url.

Checkout the runner file for some sample uses.

Shortening a single URL

Make a get request to http://localhost:3000/shorten + your params:

 GET http://localhost:3000/shorten?url=https://google.com

What you'll get back:

{
  "success": true,
  "url": "http://www.google.com",
  "short": "http://localhost:3000/ABC123"
}

Looking at click data

Make a get request to http://localhost:3000/data + your shortened link:

GET http://localhost:3000/data?url=https://google.com

What you'll get back:

{
  "success": true,
  "original": "http://www.google.com",
  "short": "http://localhost:3000/ABC123",
  "count": 10
}

Nifty!

About

Small URL shortener API, built in Rails.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published