简体   繁体   English

Azure网站中供node.js侦听的可用端口是什么?

[英]What are the available ports in an Azure web site for node.js to listen to?

Is it possible to allow Node.js to listen to multiple ports on a Windows Azure web site? 是否可以允许Node.js侦听Windows Azure网站上的多个端口? if yes, what are the available ports? 如果是,可用的端口是什么? I tried to listen to eg 3001 in server.js but got Error: listen EACCES 我尝试在server.js中收听例如3001,但出现Error: listen EACCES

Windows Azure Websites uses IISNode to host the Node process inside of IIS. Windows Azure网站使用IISNode在IIS中托管Node进程。 Your Node site is actually given a Named Pipe which receives the incoming requests, not a TCP port like you would use when running locally or hosting yourself. 实际上,为您的Node站点分配了一个命名管道,该管道接收传入的请求,而不是像在本地运行或托管自己时使用的TCP端口。 Even if you could open a TCP port, Azure Websites are really only meant for traditional websites and don't have a way to open ports to the outside world. 即使您可以打开TCP端口,Azure网站实际上也仅适用于传统网站,而无法打开通往外界的端口。

If you're looking for that type of control, you might want to look at VMs. 如果要查找这种类型的控件,则可能需要查看VM。 They offer greater flexibility at the cost of you having to do more setup. 它们以您必须进行更多设置为代价提供了更大的灵活性。 With a VM you can open ports of your choosing. 使用虚拟机,您可以打开您选择的端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM