iris/_examples/auth/basicauth/database
dependabot[bot] adb4bc6a2b
Bump golang.org/x/net in /_examples/auth/basicauth/database (#2082)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/compare/v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-19 21:15:12 +02:00
..
migration more features and fix database/mysql:jwt example 2020-11-24 14:58:02 +02:00
docker-compose.yml more features and fix database/mysql:jwt example 2020-11-24 14:58:02 +02:00
Dockerfile more features and fix database/mysql:jwt example 2020-11-24 14:58:02 +02:00
go.mod Bump golang.org/x/net in /_examples/auth/basicauth/database (#2082) 2023-02-19 21:15:12 +02:00
go.sum Bump golang.org/x/net in /_examples/auth/basicauth/database (#2082) 2023-02-19 21:15:12 +02:00
main.go update deps 2020-11-25 04:47:36 +02:00
README.md let's see 2021-02-19 08:49:15 +02:00

BasicAuth + MySQL & Docker Example

Get Started

Download the folder.

Install (Docker)

Install Docker and execute the command below

$ docker-compose up --build

Install (Manually)

Run go build -mod=mod or go run -mod=mod main.go and read below.

MySQL

Environment variables:

MYSQL_USER=user_myapp
MYSQL_PASSWORD=dbpassword
MYSQL_HOST=localhost
MYSQL_DATABASE=myapp

Download the schema from migration/db.sql and execute it against your MySQL server instance.

http://localhost:8080

username: admin
password: admin
username: iris
password: iris_password

The example does not contain code to add a user to the database, as this is out of the scope of this middleware. More features can be implemented by end-developers.