/brief

Brief makes your url's as brief as the word: "brief"

Primary LanguageGoMIT LicenseMIT

brief

Brief makes your url's as brief as the word: brief (with a few added chars 🤪)

Brief uses MD5 hashing algorithm, with base64 URL encoding and a unique counter to achieve unique short urls for each long url. Brief also allows you to specify a specific url of your choice.

Features

  • User Authentication
  • Hashing Algorithm (MD5 + base64 URL Encoding + Random counter)
  • API Testing
  • Caching with Redis
  • Analytics
  • Swagger Documentation
  • Postman Documentation
  • Continuos Integration/Delivery (CI/CD)

Requires

go 1.17+ postgresql redis docker (optional)

Setup

  • Clone project using:
    git clone https://github.com/emmrys-jay/brief.git
  • Create your env file named mine.env, and write your env variables according to sample.env in the projects root directory

  • Note: If you have docker installed, you can use postgres from docker by running the following in a separate bash shell.

    docker-compose -f postgres.docker-compose.yml up
  • Run unit tests using:
    go test -tags=unit ./...
  • Ensure your database is up and configured, then run unit tests using:
    go test -tags=integration ./...
  • Start server using:
    go run main.go

Documentation