Deploy 2 Node Applications Web app + Server (Chatbot) on Same App Service

Asheesh Mathur 25 Reputation points
2023-05-24T07:19:45.44+00:00

I am planning to deploy a Chatbot with

  1. Front End : React + Express +Socket IO : Port 80
  2. Backend : Node application Listening on Port 4000

Is this setup supported in App Service .

Presently I have created two separate app services and bounded by Port 80.

Explored file share as well, but could not make out how to deploy in them and change ports.

Could not use mounted file shares using file zilla

Looking forward to advise and steps.

Thanks

Asheesh

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
{count} votes

Accepted answer
  1. VasimTamboli 5,215 Reputation points
    2023-05-29T07:29:54.4966667+00:00

    Yes, it is possible to deploy two Node.js applications (a web app and a server) on the same Azure App Service. To achieve this setup, you can follow these steps:

    Create a new Azure App Service to host your application. You can create the App Service through the Azure portal or by using Azure CLI or Azure PowerShell.

    Set up the web app portion of your application (React + Express + Socket.IO) to listen on port 80. This is the default HTTP port, and it allows your web app to be accessible through a standard HTTP URL. Make sure your web app is configured to use port 80 in its code.

    Set up the backend server application to listen on port 4000. This can be done by configuring the server code to listen on port 4000 explicitly.

    In the Azure portal, navigate to your App Service and go to the Configuration settings. Under the "Settings" section, click on "Application settings."

    In the Application settings, add a new setting with the name WEBSITES_PORT and set its value to 4000. This setting tells Azure to route incoming traffic to port 4000 for your backend server.

    Save the configuration changes.

    By following these steps, you have configured your Azure App Service to host both the web app (listening on port 80) and the backend server (listening on port 4000). The incoming traffic will be routed accordingly based on the ports.

    Regarding the use of file shares, you mentioned exploring file shares but did not provide specific details on how you attempted to deploy and change ports. If you need assistance with deploying to file shares or using specific tools like FileZilla, please provide more details, and I'll be happy to help you further.


0 additional answers

Sort by: Most helpful

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.