Skip to content

antoniopaya22/go-rest-template-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Golang REST API

Environment variables:

  • configFilePath: string
  • logFilePath: string
  • jwtTokenSecret: string

Allows Queries:

http://localhost:3000/api/users?username=Antonio

Generate Docs

# Get swag
go get -u github.com/swaggo/swag/cmd/swag

# Generate docs
swag init --parseDependency --output docs

Run and go to http://localhost:3000/docs/index.html

Run with Docker

  1. Build
make build
docker build . -t api-rest
  1. Run
docker run -p 3000:3000 api-rest
  1. Test
go test -v ./test/...

Generate code

python .\utils\generators\main.py
  • Set the new Component inside internal/config/database.go --> migration()
  • Set the new Component inside internal/app.go --> SetRoutes()

About

Golang Gin API REST Template v2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published