2

When I try to open port 80 in node.js using this code (helloWorld)

          var http = require('http');
          var server = http.createServer(function (request, response) {
          response.writeHead(200);
          response.end("Hello World\n");
          });

          server.listen(80);

but it doesn't work, only if i give it port 8000 or something else. since i work under win7 i open the cmd with right click and then run as administrator but it seems it doesn't run like a root under linux.

enter image description here

0x90
  • 39,472
  • 36
  • 165
  • 245

2 Answers2

0

do you have any MSSQL instance running on your machine?

Try: netstat -n -n -o

0

Nodejs has a stable release for Windows

This will allow you to run Node.js on Windows without the need to integrate with Apache which is sweet.

Download and Release Details - http://blog.nodejs.org/

Community
  • 1
  • 1
Nickiler
  • 299
  • 1
  • 4