<commit_before># ggz

[![GoDoc](https://godoc.org/github.com/go-ggz/ggz?status.svg)](https://godoc.org/github.com/go-ggz/ggz)
[![Build Status](http://drone.wu-boy.com/api/badges/go-ggz/ggz/status.svg)](http://drone.wu-boy.com/go-ggz/ggz)
[![codecov](https://codecov.io/gh/go-ggz/ggz/branch/master/graph/badge.svg)](https://codecov.io/gh/go-ggz/ggz)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-ggz/ggz)](https://goreportcard.com/report/github.com/go-ggz/ggz)
[![codebeat badge](https://codebeat.co/badges/0a4eff2d-c9ac-46ed-8fd7-b59942983390)](https://codebeat.co/projects/github-com-appleboy-gorush)
[![Docker Pulls](https://img.shields.io/docker/pulls/goggz/ggz.svg)](https://hub.docker.com/r/goggz/ggz/)
[![](https://images.microbadger.com/badges/image/goggz/ggz.svg)](https://microbadger.com/images/goggz/ggz "Get your own image badge on microbadger.com")
[![Release](https://github-release-version.herokuapp.com/github/go-ggz/ggz/release.svg?style=flat)](https://github.com/go-ggz/ggz/releases/latest)

An URL shortener service written in Golang

## ggz example config

See the `.env.example`

```ini
GGZ_DB_DRIVER=mysql
GGZ_DB_USERNAME=root
GGZ_DB_PASSWORD=<PASSWORD>
GGZ_DB_NAME=ggz
GGZ_DB_HOST=127.0.0.1:3307
GGZ_SERVER_ADDR=:8080
GGZ_SHORTEN_SERVER_ADDR=:8081
GGZ_DEBUG=true
GGZ_SERVER_HOST=http://localhost:8080
GGZ_SERVER_SHORTEN_HOST=http://localhost:8081
GGZ_STORAGE_DRIVER=disk
GGZ_MINIO_ACCESS_ID=xxxxxxxx
GGZ_MINIO_SECRET_KEY=<KEY>
GGZ_MINIO_ENDPOINT=s3.example.com
GGZ_MINIO_BUCKET=qrcode
GGZ_MINIO_SSL=true
GGZ_AUTH0_PEM_PATH=pem/dev.pem<commit_msg>docs: Add Feature section.<commit_after># ggz

[![GoDoc](https://godoc.org/github.com/go-ggz/ggz?status.svg)](https://godoc.org/github.com/go-ggz/ggz)
[![Build Status](http://drone.wu-boy.com/api/badges/go-ggz/ggz/status.svg)](http://drone.wu-boy.com/go-ggz/ggz)
[![codecov](https://codecov.io/gh/go-ggz/ggz/branch/master/graph/badge.svg)](https://codecov.io/gh/go-ggz/ggz)
[![Go Report Card](https://goreportcard.com/badge/github.com/go-ggz/ggz)](https://goreportcard.com/report/github.com/go-ggz/ggz)
[![codebeat badge](https://codebeat.co/badges/0a4eff2d-c9ac-46ed-8fd7-b59942983390)](https://codebeat.co/projects/github-com-appleboy-gorush)
[![Docker Pulls](https://img.shields.io/docker/pulls/goggz/ggz.svg)](https://hub.docker.com/r/goggz/ggz/)
[![](https://images.microbadger.com/badges/image/goggz/ggz.svg)](https://microbadger.com/images/goggz/ggz "Get your own image badge on microbadger.com")
[![Release](https://github-release-version.herokuapp.com/github/go-ggz/ggz/release.svg?style=flat)](https://github.com/go-ggz/ggz/releases/latest)

An URL shortener service written in Golang

## Features

* Support [MySQL](https://www.mysql.com/), [Postgres](https://www.postgresql.org/) or [SQLite](https://www.sqlite.org/) Database.
* Support [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer) API.
* Support [Auth0](https://auth0.com/) Single Sign On.
* Support expose [prometheus](https://prometheus.io/) metrics.
* Support install TLS certificates from [Let's Encrypt](https://letsencrypt.org/) automatically.
* Support [QR Code](https://en.wikipedia.org/wiki/QR_code) Generator from shorten URL.
* Support local disk storage or [Minio Object Storage](https://minio.io/).

## Server Config

See the `.env.example`

```ini
GGZ_DB_DRIVER=mysql
GGZ_DB_USERNAME=root
GGZ_DB_PASSWORD=<PASSWORD>
GGZ_DB_NAME=ggz
GGZ_DB_HOST=127.0.0.1:3307
GGZ_SERVER_ADDR=:8080
GGZ_SHORTEN_SERVER_ADDR=:8081
GGZ_DEBUG=true
GGZ_SERVER_HOST=http://localhost:8080
GGZ_SERVER_SHORTEN_HOST=http://localhost:8081
GGZ_STORAGE_DRIVER=disk
GGZ_MINIO_ACCESS_ID=xxxxxxxx
GGZ_MINIO_SECRET_KEY=xxxxxxxx
GGZ_MINIO_ENDPOINT=s3.example.com
GGZ_MINIO_BUCKET=qrcode
GGZ_MINIO_SSL=true
GGZ_AUTH0_PEM_PATH=pem/dev.pem
{'fraction_non_alphanumeric': 0.1804273278818254, 'fraction_numerical': 0.02532313373780005, 'mean_word_length': 6.074626865671642, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 37, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 3, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2690496', 'n_tokens_mistral': 1673, 'n_tokens_neox': 1563, 'n_words': 149}