<p>Here are the exact steps I just took to run the “Hello World” example found at <a href="http://nodejs.org/">http://nodejs.org/</a>. This is a quick and dirty example. For a permanent installation you’d want to store the executable in a more reasonable place than the root directory and update your <code>PATH</code> to include its location.</p>
<ul>
<li>
<p>Download the Windows executable here: <a href="http://nodejs.org/#download">http://nodejs.org/#download</a></p>
</li>
<li>
<p>Copy the file to C:</p>
</li>
<li>
<p>Create C:\hello.js</p>
</li>
<li>
<p>Paste in the following content:</p>
</li>
</ul>
<p>` var http = require(‘http’);<br>
http.createServer(function (req, res) {<br>
res.writeHead(200, {‘Content-Type’: ‘text/plain’});<br>
res.end(‘Hello World\n’);<br>
}).listen(1337, “127.0.0.1”);<br>
console.log(‘Server running at <a href="http://127.0.0.1:1337/">http://127.0.0.1:1337/</a>’);</p>
<pre><code class="lang-auto">
Save the file
Start -> Run... -> cmd
c:
-
C:>node hello.js
</code></pre>
<p>Server running at <a href="http://127.0.0.1:1337/">http://127.0.0.1:1337/</a></p>
<pre><code class="lang-auto">
That's it. This was done on Windows XP.</code></pre>