I have a standard Apache server. Do I need anything special to run a node.js script (http://socket.io/) on the serverside?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Node.js provides its own HTTP server, thus making Apache unnecessary.
If you wish to run Apache and Node.js on the same server, either set node to listen to port 80 and forward unhandled requests to Apache, or vice versa
In both instances, Node/Apache will listen to the publicly open port 80, and forward to Apache/Node listening on some non-public port.
回答2:
You will need shell access to start the node.js server. So it most likely won't work on shared hosting.