Skip to content

sharifli4/url-shortener-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL shortener application API

This is a simple URL shortener application API written in Go.
It uses Redis for caching to store token of URL and return domain with token.
API idempotency will be implemented.

How to run

  1. Clone the repository

git clone https://github.com/shari4ov/url-shortener-go
  1. To set domain name for the shortened URLs, change the value of TINY_DOMAIN in docker-compose.yml file

  1. Run the application

task run
  1. Open postman and send a POST request to http://localhost:8080 with the following body:

{
    "url": "https://www.google.com"
}
  1. You will receive a response with the shortened URL:

{
    "url": "http://${TINY_DOMAIN}/1"
}
  1. Open the shortened URL in your browser and you will be redirected to the original URL

http://${TINY_DOMAIN}/1 -> https://www.google.com

About

URL shortener web application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published