How to deploy NestJS with TCP listener on function app

Brad Wong 1 Reputation point
2022-03-04T05:54:28.437+00:00

I have some problems on NestJS microservice. The microservice is using TCP listener and follow NestJS documentation to develop all services on my localhost. Everything is good and able to run without issue. However, when I install Azure Function App and build the Apps with:

npm run start:azure

On my microservices and API entity point(REST API) The TCP listener is stop working.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,909 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 70,936 Reputation points Moderator
    2022-03-07T11:34:33.723+00:00

    @Brad Wong The only way an application can be accessed via the internet is through the already-exposed HTTP (80) and HTTPS (443) TCP ports. Applications may not listen on other ports for packets arriving from the internet as mentioned in this document. If you are trying to create the service on any other port or apart from HTTP/HTTPS protocol then it may not work.

    To start with creating Node JS function app I will suggest you to review this document. In case if I misunderstand your requirement please share the reference document if any you are following deployed your application on the azure function app and if there are any/error exception.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.