Shortly is a URL shortener service.
Go version 1.17.2
go build .
./shortly
go run .
make run
go test -v ./... -tags=unit
make unit-test
golangci-lint run -c .golangci.yml -v
make lint
docker build -t shortly .
docker run -p 6161:6161 shortly
Apply development file to k8s
kubectl apply -f k8s/deployment.yaml
📌 This service can run with 5 different pods. All pods use common data.
Swagger For API Documentation
Testify For Test
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
❗️️Heroku may remove project data for it is free that's why you don't may see your data.