0

How does node work? I have installed node on the server. On the same network is my work computer where I have git bash and my project files. Am i unable to run my files on my work computer as long as I call the right port number? I am running the code below on my local machine calling the ip address and port number. But then I am getting this error. Error 0x2 starting node.exe index.js

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World!n');
}).listen(1337, 'ip');
console.log('Server running at http://ip:1337/');
1
  • Which server are you using? Commented Feb 2, 2016 at 17:15

1 Answer 1

1

Normally this is due to a corrupted binary, I would reinstall both git and node to fix problem.

Sign up to request clarification or add additional context in comments.

3 Comments

Server PC; it's where the repository is.
its only supposed to be on the server pc? how do u call your work then? you have to always open up the server?
my only question is that u must always be logged into the server to use it then?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.