Reputation: 31
For a class project, I'm trying to use an Azure App Service to expose simple node.js TCP service on a numeric port. This service would be consumed by a Java TCP client app. I've already tried doing this so using the "Web Apps" service but apparently IIS will host my node.js app on a named pipe so that node.js has process.env.PORT = "\\.\pipe\(guid...)"
instead of any port number I try. Would any of the other Azure App Services be ideally suited to hosting a TCP service that has net.Server
listen
on a user-defined port number? If so, which App Service and why?
Unfortunately, the DreamSpark Azure subscription I have does not include Virtual Machines, so deploying the node.JS app to a Linux VM for example, is not an option for me.
Upvotes: 2
Views: 2422
Reputation: 24148
As @JoshL said, Azure App Service does not listen on other ports for packets arriving from the internet besides the endpoints 80 and 443, please see the wike page https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#network-endpoint-listening.
According to the description of MS Azure for DreamSpark, I suggest you may need to upgrade the subscription for Azure Service if you have to use the Azure VM or other services.
Upvotes: 2
Reputation: 1716
Unfortunately, the Azure App Service does not support HTTP connections outside of ports 80 or 443:
Details on app hosting limitations in Azure App Service
Beyond Azure App Service (and VMs, which you indicated you can't use), if you're able to use Azure Service Fabric, you might consider hosting your Node.js app with that. This would allow you to specify a specific port number:
Hosting Node.js and similar apps on Azure Service Fabric
Service Fabric is a microservices platform for Azure, and has many deployment and management benefits for hosted applications. That said, there is some upfront setup involved and many of the benefits of SF accrue over time (vs. immediately), so it may or may not suit the needs of your class project.
Best of luck!
Upvotes: 3