Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.25 KB

README.md

File metadata and controls

47 lines (32 loc) · 1.25 KB
title keywords description
URL Shortener
url shortener
redis
api
URL shortening service with a simple API.

URL Shortener API

Github StackBlitz

This project provides a URL shortening service with a simple API.

Tech Stack

  • Golang
  • Redis

API Documentation

API endpoint: http://localhost:3000/api/v1/

API Payload

  • url - Original URL
  • short - Custom short URL (Optional)
  • expiry - Time to expire: int (hours)

API Response

  • url - Original URL
  • short - Custom short URL
  • expiry - Time to expire: int (hours)
  • rate_limit - Number of API calls remaining: int
  • rate_limit_reset - Time to rate limit reset: int (minutes)

API is rate limited to 10 calls every 30 minutes. These values can be changed in the .env file. Have fun.

Setup

  1. Start the containers:

    docker-compose up -d
  2. Test the API: test.gif