Skip to content

Use go and redis to implement basic shorten url service.

Notifications You must be signed in to change notification settings

vicky-sunshine/shorten

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
}

About

Use go and redis to implement basic shorten url service.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages