chore(examples): improve logging and how to use (#266)
This commit is contained in:
parent
b031c1f297
commit
1535ea4f6c
3 changed files with 4 additions and 1 deletions
|
@ -45,7 +45,7 @@ Check the `/example` folder where example code for different scenarios is locate
|
||||||
# start oidc op server
|
# start oidc op server
|
||||||
# oidc discovery http://localhost:9998/.well-known/openid-configuration
|
# oidc discovery http://localhost:9998/.well-known/openid-configuration
|
||||||
go run github.com/zitadel/oidc/example/server
|
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
|
CLIENT_ID=web CLIENT_SECRET=secret ISSUER=http://localhost:9998 SCOPES="openid profile" PORT=9999 go run github.com/zitadel/oidc/example/client/app
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -93,5 +93,6 @@ func main() {
|
||||||
|
|
||||||
lis := fmt.Sprintf("127.0.0.1:%s", port)
|
lis := fmt.Sprintf("127.0.0.1:%s", port)
|
||||||
logrus.Infof("listening on http://%s/", lis)
|
logrus.Infof("listening on http://%s/", lis)
|
||||||
|
logrus.Info("press ctrl+c to stop")
|
||||||
logrus.Fatal(http.ListenAndServe(lis, nil))
|
logrus.Fatal(http.ListenAndServe(lis, nil))
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,8 @@ func main() {
|
||||||
Addr: ":" + port,
|
Addr: ":" + port,
|
||||||
Handler: router,
|
Handler: router,
|
||||||
}
|
}
|
||||||
|
log.Printf("server listening on http://localhost:%s/", port)
|
||||||
|
log.Println("press ctrl+c to stop")
|
||||||
err := server.ListenAndServe()
|
err := server.ListenAndServe()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue