Github: https://github.com/bibhutighimire/JWT-Authentication-Cookie-using-GOLANG-web-API-Postgres-GIN-GORM.git
Instructions:
go mod init yourprojectname
go get github.com/githubnemo/CompileDaemon
go install github.com/githubnemo/CompileDaemon
go get -u github.com/gin-gonic/gin
go get -u gorm.io/gorm
go get -u gorm.io/driver/
go get github.com/joho/godotenv
https://customer.elephantsql.com/
To Migrate:
go run migrate/migrate.go
(migrate/migrate.go is my filename, put your foldername and file name here)
To build:
CompileDaemon -command="./myProjectName"
(Put your project name instead of myProjectName)
CORS:
go get github.com/gin-contrib/cors
Create React Project
npx create-react-app yourprojectname
Install RTK
npm install @reduxjs/toolkit react-redux
Install Router
npm i -D react-router-dom
For Authentication:
https://github.com/golang-jwt/jwt
go get -u github.com/golang-jwt/jwt/v5
Bcrypt:
go get -u golang.org/x/crypto/bcrypt
#golangtutorial #golang #ginwebframework #gorm #redux #redux #postgresql
Download
0 formats
No download links available.
JWT Authentication, Cookie using GOLANG web API , Postgres, GIN web framework, GORM - 2023 Pt- 4 | NatokHD