This project is created as an exercise for unserstanding the implementation of Json Web Token (JWT) in golang signin rest api. This project is the continuation of the previous project (https://github.com/aliftech/todo-api)
Before installing this project, you should know about the project requirements. Here are the requirements that you need to prepared:
- Go Programming Laguage
- Knowledge about Go.
- Knowledge about REST-API
This project is build using some third parties or dependencies. Here are the required dependencies:
- Gin (https://gin-gonic.com/)
- Gorm (https://gorm.io/)
- Go dotenv (https://github.com/joho/godotenv)
- CompileDaemon (https://github.com/githubnemo/CompileDaemon)
- MySQL driver (https://gorm.io/docs/connecting_to_the_database.html)
- Go-JWT (https://pkg.go.dev/github.com/golang-jwt/jwt/v5)
- Go Cryptography (https://pkg.go.dev/golang.org/x/crypto). in this case we use bcrypt to encrypt our password.
We make a little modification, so that you don't need to run the migration manually. When you running this project, it will automaticly run the migration.
To run the project, you can use a usual go command:
go run main.goBut, in this project we are not going to use it. Instead of using go run command, we will using CompileDaemon to run our application. Here is the command to run our application using CompileDaemon:
CompileDaemon -command="./go-jwt"