Skip to content

kitarp29/urlShortner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortner

It is a URL shortener written in golang. Shorten URLs, manage your links!

Introduction 👋🏻

A URL shortener is a simple tool that takes a long URL and turns it into a shorter URL for you. As social media emerged, lengthy URLs started to present a problem. Originally, Twitter limited their messages to a maximum of 140 characters, and they counted every character in a link. This meant that a lengthy URL could take up your entire tweet. URL shortener tools emerged as a solution to this sharing problem. An URL shortener ensures that you get the right messages out to your audience without taking up too much space in your social posts.

Getting started ▶️

To start using the project you need to install Golang (I tried it for Go 1.19).

  1. Run these commands:
git clone https://github.com/kitarp29/urlShortner.git
cd Infra
  1. Make sure you have Golang installed on your system.
go --version 

  1. Now, we install the pkgs
go mod tidy
  1. Finally run the server using:
go run main.go

API will be running at localohost:8000 now.

The project is up and running🔥!


Running in a Docker container 📦

Ensure you have docker installed in your system

  1. Make sure you are inside the folder of the project.
  2. Run this command to build the Docker Image:
docker build . -t urlshort
  1. You can check the image by running this:
docker images | grep urlshort
  1. Run a container using this:
docker run -p 8000:8000 urlshort:latest  

API will be running at localohost:8000 now.

The project is up and running🔥!

Refer PostMan Collection: Here

Thanks for the interest in my API :)


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published