简体   繁体   中英

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? if yes, what are the available ports? I tried to listen to eg 3001 in server.js but got Error: listen EACCES

Windows Azure Websites uses IISNode to host the Node process inside of IIS. 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. 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.

If you're looking for that type of control, you might want to look at VMs. They offer greater flexibility at the cost of you having to do more setup. With a VM you can open ports of your choosing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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