Skip to content

Latest commit

 

History

History
98 lines (76 loc) · 1.58 KB

README.md

File metadata and controls

98 lines (76 loc) · 1.58 KB

Shortly


Shortly is a URL shortener service.

Required

Go version 1.17.2

Build and Run

Build

go build .

Run

./shortly

Build and Run

go run .
make run

Test

go test -v ./... -tags=unit
make unit-test

Code Quality

Run lint

golangci-lint run -c .golangci.yml -v
make lint

Dockerize

Build

docker build -t shortly .

Run

docker run -p 6161:6161 shortly

Kubernetes

Apply development file to k8s

kubectl apply -f k8s/deployment.yaml

📌 This service can run with 5 different pods. All pods use common data.

Used Libraries

Swagger For API Documentation
Testify For Test

Inception

excalidraw

API DOC

Swagger

Install swagger

go install github.com/swaggo/swag/cmd/swag@latest

Swagger Initialize

swag init

Dev

First of all you must run the project. http://localhost:6161/api/swagger/index.html

Production [Heroku]

📃 Shortly swagger API doc in live

It is Live in HEROKU

❗️️Heroku may remove project data for it is free that's why you don't may see your data.

📺 Shortly Base URL
Service Health