run node.js webbapp on 80 port on windows

silent_coder picture silent_coder · Sep 26, 2013 · Viewed 21.1k times · Source

I need to make my local node.js webapp listen 80 port. Now if run my app on port 80 I get this erro

events.js:72
        throw er; // Unhandled 'error' event
          ^
Error: listen EACCES
    at errnoException (net.js:901:11)
    at Server._listen2 (net.js:1020:19)
    at listen (net.js:1061:10)
    at Server.listen (net.js:1127:5)
    at Object.<anonymous> (\scripts\server.js:23:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10) 

And if run app on 4321 port this error do not reproduced, so it's port depending.

What should I do to be able run my app on port 80 on Windows 7

Answer

Ph0en1x picture Ph0en1x · Sep 26, 2013

On windows machine you 80 port probably busy with IIS Server. Try to stop iis first and after run node.js webapp with port 80.