Allow custom port Inbound for node js server

Suraj Bhatt 21 Reputation points
2021-02-22T09:00:41.17+00:00

Hi,
Can any one help me how to set custom port Inbound e.g. 1000 on node js server in azure instance or with IIS to allow inbound custom port in Azure VM?

Thanks in advance.

Azure Container Instances
Azure Container Instances
An Azure service that provides customers with a serverless container experience.
625 questions
0 comments No comments
{count} votes

Accepted answer
  1. prmanhas-MSFT 17,886 Reputation points Microsoft Employee
    2021-02-23T14:18:24.26+00:00

    @Suraj Bhatt Apologies for the delay in response and all the inconvenience caused because of the issue.

    You can refer to this doc to understand How to open ports to a virtual machine with the Azure portal in general.

    For Node js Sever you can refer to this for more info.

    Below might be helpful as well:

    https://learn.microsoft.com/en-us/answers/questions/127951/unable-to-access-custom-port-in-azure-vm.html

    https://abrahamjohnblog.wordpress.com/azure-vm-configure-iis-and-expose/

    Hope it helps!!!

    Please "Accept as Answer" if it helped so it can help others in community looking for help on similar topics.

    Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as convenient to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.
    There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. nigel wright 96 Reputation points
    2021-06-19T19:53:13.843+00:00

    I use port 8080 which is set in project properties.

    var port = process.env.PORT || 3001;
    app.listen(port);

    0 comments No comments