aryan9600 / shorten-url

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Shorten URL

This is a short project that I made to explore GoLang. The idea was to create my own bit.ly using GoLang. It uses BoltDB buckets to store tokens and corresponding URLs in a map like {token: URL}. After registering your token and URL, simply go to www.example.com/yourToken and you will be redirected to your desired URL!

Usage:

git clone https://github.com/aryan9600/shorten-url.git

cd shorten-url

go run main.go

Endpoint Method Body
/api/v1/shorten POST {"path: "token", "url": "URL"}
/api/v1/shorten GET, DELETE {"path": "token"}

About


Languages

Language:Go 96.8%Language:Dockerfile 3.2%