https://github.com/arronf2e/gin_gorm_tutorial
gin_gorm_tutorial
https://github.com/arronf2e/gin_gorm_tutorial
Last synced: about 1 year ago
JSON representation
gin_gorm_tutorial
- Host: GitHub
- URL: https://github.com/arronf2e/gin_gorm_tutorial
- Owner: arronf2e
- Created: 2023-11-27T13:47:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T05:38:42.000Z (over 2 years ago)
- Last Synced: 2025-02-07T10:28:39.644Z (over 1 year ago)
- Language: Go
- Size: 66.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### package used
- viper: load and validate the environment variables
go get github.com/spf13/viper
- gorm: connect to pgsql
go get -u gorm.io/gorm
go get gorm.io/driver/postgres
- uuid: generates and inspects UUIDs
go get github.com/google/uuid
- gin
go get github.com/gin-gonic/gin
- air: livereload
go get github.com/cosmtrek/air@latest
- jwt
github.com/golang-jwt/jwt
- html2text: cover html to text
go get github.com/k3a/html2text
- gomail: send email
go get gopkg.in/gomail.v2
- randstr: generate random string
go get github.com/thanhpk/randstr
### Start pg docker container
```shell
docker-compose up -d
```
### package install
```shell
go mod tidy
```
### migrate
```shell
go run migrate/migrate.go
```
### start server
```shell
air
```