title: Run a javascript file on VPS with node.js?
body: <p>I have followed this guide to install Node.js on my centOS VPS.
  <a href="https://www.digitalocean.com/community/articles/how-to-install-and-run-a-node-js-app-on-centos-6-4-64bit" rel="nofollow">This one</a></p>
  
  <p>And i have a simple chat.js file on the server looking like this:</p>
  
  <pre><code>var http = require('http');
  
  var s = http.createServer(function(req, res){
  res.writeHead(200, {'content-type':'text/plain'});
  res.end("hello\n");
  console.log('user entered');
  });
  
  s.listen(8000);
  </code></pre>
  
  <p>And here is the question.
  How do i run that chat.js file?
  I have tryed to navigate to the folder and "node chat.js"
  but then it gives me an error:</p>
  
  <pre><code> -bash: node: command not found"
  </code></pre>
  
  <p>can any tell me what im doing wrong?</p>