- Basic Authentication middleware for Fiber that provides an HTTP: https://docs.gofiber.io/api/middleware/basicauth/
- Session: https://docs.gofiber.io/api/middleware/session/
- Cache: https://docs.gofiber.io/api/middleware/cache/
- Standard Go Project Layout: https://github.com/golang-standards/project-layout/
- Database PostgreSQL GORM: + users_db, posts_db
authConfig := basicauth.Config{
Users: map[string]string{
"admin": "password123",
"testUser": "testUser",
},
}
Github: https://github.com/asakew/goFiber-BasicAuth/
git clone https://github.com/asakew/goFiber-BasicAuth
go mod tidy
go run app/main.go
CTRL + C # Windows
CTRL + Break # Linux
Control + C # Mac
go mod tidy # updates go.mod and go.sum
go mod download # downloads all the dependencies
go build # builds the binary