Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freeshineit/gin_serve
golang gin restful server
https://github.com/freeshineit/gin_serve
docker gin gin-gonic go golang mysql proxy redis restful-api swagger
Last synced: 4 months ago
JSON representation
golang gin restful server
- Host: GitHub
- URL: https://github.com/freeshineit/gin_serve
- Owner: freeshineit
- License: mit
- Created: 2022-05-15T14:29:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-24T16:37:14.000Z (7 months ago)
- Last Synced: 2024-07-24T19:17:38.567Z (7 months ago)
- Topics: docker, gin, gin-gonic, go, golang, mysql, proxy, redis, restful-api, swagger
- Language: Go
- Homepage:
- Size: 476 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![build](https://github.com/freeshineit/gin_serve/workflows/build/badge.svg)
## Use
```bash
# create docker network
docker network create my_net# 初始化 mysql , redis 等 (前提是已经安装docker)
# initialization docker container, mysql, redis...
docker-compose -f db-docker-compose.yaml up -d
# or (Makefile)
make db# run development
# https://github.com/cosmtrek/air Live reload for Go apps
air## development
# http://localhost:8080
# http://localhost:8081
# http://localhost:8082
# http://localhost:8080/swagger/index.html
go run cmd/main.go# Run make build to compile app.
make build# help
./bin/app --help# run production
./bin/app --mode=release# docker deploy app
docker build -t gin_serve:latest .
# http://localhost:3000
# http://localhost:3001
# http://localhost:3002
# run docker
docker run -it -p 3000:3000 -p 3001:3001 -p 3002:3002 --rm --net my_net --name gin_serve_api_service gin_serve:latest# or (Makefile)
make serve# generate api docs
swag init -g ./main.gohttp://localhost:8080/swagger/index.html
#
go mod tidy```
## Feature
- [x] RESTful API
- [x] JWT authentication
- [x] Email login/register
- [x] Swagger api document
- [ ] [Sentry](https://sentry.io/welcome/)