Skip to content

How do I get express service port information in the backend service or node environment? #8200

Answered by akosyakov
zhaomenghuan asked this question in General
Discussion options

You must be logged in to vote

You should implement BackendApplicationContirbution.onStart lifecycle callbacks. As an argument you will receive an instance of server on which you can call server.address().port.

Obviously it does not necessary the same port as on frontend, if you deploy behind proxy or something. In such case you are better to implement the frontend contribution and make use of Endpoint.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zhaomenghuan
Comment options

Answer selected by zhaomenghuan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants