Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 1.04 KB

README.md

File metadata and controls

33 lines (27 loc) · 1.04 KB

JWT_REST_GIN_GORM_MySQL

Web service CRUD using Golang with GIN for create REST api, MySQL as database, Viper as environment variable, JWT for secure service and Cookies to store token.

Prerequisites

  1. Go
  2. Gin
  3. GORM
  4. Mysql
  5. Viper
  6. BCrypt
  7. JWT
  8. UUID

Getting Started

  1. Firstly, we need to get Gin, MySQL, Viper, jwt and ksuid for UUID library dependencies for install it
go get github.com/gin-gonic/gin
go get gorm.io/gorm
go get gorm.io/driver/mysql
go get github.com/spf13/viper
go get golang.org/x/crypto/bcrypt
go get github.com/dgrijalva/jwt-go
go get github.com/segmentio/ksuid
  1. Import dump.sql to your MySQL and configure your credential in folder resource.

  2. To run application,open cmd in your project directory and type

go run main.go