Fikri1234 / 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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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.


Languages

Language:Go 100.0%