Node.js: ECONNREFUSED on Port 80

后端 未结 5 777
暗喜
暗喜 2020-12-31 21:42

I\'ve written a web-server using Node.js. When I tried to test my server with the tester I\'ve written for it, I succeed only if the port I\'m using for the server is not 80

5条回答
  •  半阙折子戏
    2020-12-31 21:53

    An alternate option that I haven't seen in the above list is also to permit your process to bind to a privileged port (<1024) by executing the following command on the node executable. (Adapt the path)

    setcap 'cap_net_bind_service=+ep' /opt/meteor/.meteor/tools/latest/bin/node
    

    The annoyance is that you must reissue this command every time you update or change the node executable.

    Regards,

提交回复
热议问题