sadegh-msm / ShoLingo

Make your URLs shorter and more memorable in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ShoLingo: A URL Shortener in Go

ShoLingo is a simple yet effective URL shortener service written in Go. This project showcases the power of Go in building high-performance web services with a minimal footprint.

Table of Contents

  1. Features
  2. Prerequisites
  3. Installation
  4. Usage
  5. Contributing
  6. License

Features

  • Generate short URLs for long URLs.
  • High-performance handling of requests.
  • Use of Go's strong concurrency model with Goroutines.
  • Redis as the primary store for high-speed URL redirection.

Prerequisites

  • Go (Version 1.16 or higher)
  • Redis (Version 5.0 or higher)

Installation

  1. Clone the repository:

    git clone https://github.com/sadegh-msm/ShoLingo.git
  2. Navigate into the cloned repository:

    cd ShoLingo
  3. Install the required Go dependencies:

    go mod download
  4. Compile and run the server:

    go run main.go

Usage

After starting the server, you can use the following endpoints:

e.GET("/:url", routes.ResolveURL)
e.POST("/api/v1", routes.ShortenURL)

This project is dockerized and you can build the images with dockerfiles.

You can also change the configuration in .env file.

About

Make your URLs shorter and more memorable in Go


Languages

Language:Go 94.4%Language:Dockerfile 5.6%