node监听80端口权限问题

报了这个错误:

 

  Error: listen EACCES: permission denied 127.0.0.1:80

      at Server.setupListenHandle [as _listen2] (net.js:1273:19)

      at listenInCluster (net.js:1338:12)

      at GetAddrInfoReqWrap.doListen [as callback] (net.js:1471:7)

      at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:62:10)

  Emitted 'error' event at:

      at emitErrorNT (net.js:1317:8)

      at process._tickCallback (internal/process/next_tick.js:63:19)

 

 

在执行 node 1.js前加上sudo

posted @ 2019-05-13 17:37  Mr_R  阅读(1616)  评论(0编辑  收藏  举报