chore(examples): improve logging and how to use (#266)

This commit is contained in:
Livio Spring 2023-01-25 06:22:12 +01:00 committed by GitHub
parent b031c1f297
commit 1535ea4f6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -45,7 +45,7 @@ Check the `/example` folder where example code for different scenarios is locate
# start oidc op server
# oidc discovery http://localhost:9998/.well-known/openid-configuration
go run github.com/zitadel/oidc/example/server
# start oidc web client
# start oidc web client (in a new terminal)
CLIENT_ID=web CLIENT_SECRET=secret ISSUER=http://localhost:9998 SCOPES="openid profile" PORT=9999 go run github.com/zitadel/oidc/example/client/app
```

View file

@ -93,5 +93,6 @@ func main() {
lis := fmt.Sprintf("127.0.0.1:%s", port)
logrus.Infof("listening on http://%s/", lis)
logrus.Info("press ctrl+c to stop")
logrus.Fatal(http.ListenAndServe(lis, nil))
}

View file

@ -24,6 +24,8 @@ func main() {
Addr: ":" + port,
Handler: router,
}
log.Printf("server listening on http://localhost:%s/", port)
log.Println("press ctrl+c to stop")
err := server.ListenAndServe()
if err != nil {
log.Fatal(err)