From 3104662bab1fc4a0ce2fc847fbe7eadd9c8ba380 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 3 Jun 2010 18:44:05 -0700 Subject: [PATCH] Use a less common port in docs --- doc/api.markdown | 10 +++++----- doc/index.html | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/api.markdown b/doc/api.markdown index 56316500767..c9a2add9d8f 100644 --- a/doc/api.markdown +++ b/doc/api.markdown @@ -12,15 +12,15 @@ World': http.createServer(function (request, response) { response.writeHead(200, {'Content-Type': 'text/plain'}); response.end('Hello World\n'); - }).listen(8000); + }).listen(8124); - sys.puts('Server running at http://127.0.0.1:8000/'); + sys.puts('Server running at http://127.0.0.1:8124/'); To run the server, put the code into a file called `example.js` and execute it with the node program > node example.js - Server running at http://127.0.0.1:8000/ + Server running at http://127.0.0.1:8124/ All of the examples in the documentation can be run similarly. @@ -2052,7 +2052,7 @@ A reference to the `http.Client` that this response belongs to. This class is used to create a TCP or UNIX server. Here is an example of a echo server which listens for connections -on port 7000: +on port 8124: var net = require('net'); var server = net.createServer(function (stream) { @@ -2068,7 +2068,7 @@ on port 7000: stream.end(); }); }); - server.listen(7000, 'localhost'); + server.listen(8124, 'localhost'); To listen on the socket `'/tmp/echo.sock'`, the last line would just be changed to diff --git a/doc/index.html b/doc/index.html index b2eb3b5f396..5c7f9d72c6a 100644 --- a/doc/index.html +++ b/doc/index.html @@ -49,8 +49,8 @@ http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }, 2000); -}).listen(8000); -sys.puts('Server running at http://127.0.0.1:8000/'); +}).listen(8124); +sys.puts('Server running at http://127.0.0.1:8124/');

@@ -60,10 +60,10 @@ sys.puts('Server running at http://127.0.0.1:8000/');

 % node example.js
-Server running at http://127.0.0.1:8000/
+Server running at http://127.0.0.1:8124/

- Here is an example of a simple TCP server which listens on port 7000 + Here is an example of a simple TCP server which listens on port 8124 and echos whatever you send it:

@@ -82,7 +82,7 @@ var server = tcp.createServer(function (socket) { socket.end(); }); }); -server.listen(7000, "localhost"); +server.listen(8124);

See the API documentation for more