URL shortener in Go using Redis and go-chi.
Try Redis Enterprise free in the cloud here. Get upto 30 MB of free storage on their enterprise cloud. 😎
After all the package setup done, run the main.go
file.
The app will run on localhost:8080
POST - /
Request - Make sure to include http:// or https://
{
"url":"https://www.google.com"
}
Response -
{
"code": "Fek6nO0Zg",
"url": "https://www.google.com",
"created_at": 1572207289
}
GET - /{string}
- Will take you the webiste for which the URL is already shortened.
The username and passwords for the Redis Cluster used in this project are shown for reference only and are disposed with care 🎉
There were a lot of projects running on my GoLand IDE. You may have to reconfigure few of the packages on your own. 😕
Want to contribute? Great!