Skip to content

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.

Notifications You must be signed in to change notification settings

Fikri1234/JWT_REST_GIN_GORM_MySQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages