Skip to content

Commit

Permalink
chore(examples): improve logging and how to use (zitadel#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
livio-a authored Jan 25, 2023
1 parent b031c1f commit 1535ea4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down
1 change: 1 addition & 0 deletions example/client/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
2 changes: 2 additions & 0 deletions example/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1535ea4

Please sign in to comment.