Use better ports on the home page

v0.7.4-release
Ryan Dahl 2011-04-22 16:01:34 -07:00
parent ed657e9d46
commit 3ce5e6fe5e
1 changed files with 6 additions and 6 deletions

View File

@ -55,8 +55,8 @@ var http = require('http');
http.createServer(function (req, res) { http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'}); res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n'); res.end('Hello World\n');
}).listen(8124, "127.0.0.1"); }).listen(1337, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/'); console.log('Server running at http://127.0.0.1:1337/');
</pre> </pre>
<p> <p>
@ -66,10 +66,10 @@ console.log('Server running at http://127.0.0.1:8124/');
</p> </p>
<pre class="sh_none"> <pre class="sh_none">
% node example.js % node example.js
Server running at http://127.0.0.1:8124/</pre> Server running at http://127.0.0.1:1337/</pre>
<p> <p>
Here is an example of a simple TCP server which listens on port 8124 Here is an example of a simple TCP server which listens on port 1337
and echoes whatever you send it: and echoes whatever you send it:
</p> </p>
@ -79,9 +79,9 @@ var net = require('net');
var server = net.createServer(function (socket) { var server = net.createServer(function (socket) {
socket.write("Echo server\r\n"); socket.write("Echo server\r\n");
socket.pipe(socket); socket.pipe(socket);
}) });
server.listen(8124, "127.0.0.1"); server.listen(1337, "127.0.0.1");
</pre> </pre>
<p> <p>