Skip to content

Commit

Permalink
On startup log link to Conduit UI and swagger UI (#782)
Browse files Browse the repository at this point in the history
* on startup log link to Conduit UI and swagger UI

* update clean target
  • Loading branch information
lovromazgon authored Dec 15, 2022
1 parent 1cf3075 commit 56c0201
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ proto-lint:

clean:
@rm -f conduit
@rm -f conduit-pipeline-check
@rm -rf pkg/web/ui/dist

download:
Expand Down
11 changes: 10 additions & 1 deletion pkg/conduit/runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,20 @@ func (r *Runtime) Run(ctx context.Context) (err error) {
if err != nil {
return cerrors.Errorf("failed to serve grpc api: %w", err)
}
_, err = r.serveHTTPAPI(ctx, t, grpcAddr)
httpAddr, err := r.serveHTTPAPI(ctx, t, grpcAddr)
if err != nil {
return cerrors.Errorf("failed to serve http api: %w", err)
}

port := 8080 // default
if tcpAddr, ok := httpAddr.(*net.TCPAddr); ok {
port = tcpAddr.Port
}
r.logger.Info(ctx).Send()
r.logger.Info(ctx).Msgf("click here to navigate to Conduit UI: http://localhost:%d/ui", port)
r.logger.Info(ctx).Msgf("click here to navigate to explore the HTTP API: http://localhost:%d/openapi", port)
r.logger.Info(ctx).Send()

return nil
}

Expand Down

0 comments on commit 56c0201

Please sign in to comment.