Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 538 Bytes

readme.md

File metadata and controls

40 lines (27 loc) · 538 Bytes

Redis Shorten URL

[Work in Progress] Use go and redis to implement basic shorten url service.

Run

  1. You need a redis service and run it up.

  2. Run this service

    go run main.go

API

GET /:shortid

Given a short id, it will redirect to target url if found. If not found, it will return 400.

POST /shorten

request body example

{
    "URL": "http://google.com"
}

response body example

{
  "URL": "https://github.com/vicky-sunshine",
  "ID": "855215"
}