Skip to content

URL shortener (GoLang) with concurrency, authentication, middleware, compression, Postgres database, unit tests.

Notifications You must be signed in to change notification settings

allensuvorov/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URL Shortener

Go PostgreSQL License: MIT

A high-performance URL shortening service with authentication, built with Go and PostgreSQL.

Features

  • 🚀 RESTful API with JSON support
  • 🔐 JWT Authentication
  • 🗄️ PostgreSQL storage with soft deletes
  • 📦 Bulk URL operations
  • ⚡ Gzip compression middleware
  • 🧪 Comprehensive unit tests
  • ⚙️ Dual configuration (env vars + CLI flags)

Quick Start

Prerequisites

  • Go 1.18+
  • PostgreSQL 13+

Installation

git clone https://github.com/allensuvorov/url-shortener.git
cd url-shortener

# Set up environment
export DATABASE_DSN="postgres://user:password@localhost:5432/dbname?sslmode=disable"
export SERVER_ADDRESS=":8080"

# Run
go run cmd/shortener/main.go

About

URL shortener (GoLang) with concurrency, authentication, middleware, compression, Postgres database, unit tests.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages