diff --git a/doc/index.html b/doc/index.html index cceaaab9d02..10d0c4b5afa 100644 --- a/doc/index.html +++ b/doc/index.html @@ -17,9 +17,9 @@
-% /usr/local/bin/node example.js +% node example.js Server running at http://127.0.0.1:8000/+
+ Here is an example of a simple TCP server which listens on port 7000 + and echos whatever you send it: +
+ ++var tcp = require("/tcp.js"); +var server = tcp.createServer(function (socket) { + socket.setEncoding("utf8"); + socket.addListener("connect", function () { + socket.send("hello\r\n"); + }); + socket.addListener("receive", function (data) { + socket.send(data); + }); + socket.addListener("eof", function () { + socket.send("goodbye\r\n"); + socket.close(); + }); +}); +server.listen(7000, "localhost");+
See the API documentation for more examples.
++ git repo +
++ 2009.10.09 + node-v0.1.14.tar.gz +
+ ++ Node eventually wants to support all POSIX operating systems + (including Windows with MinGW) but at the moment it is only being + tested on Linux, Macintosh, and FreeBSD. The + build system requires Python 2.4 or better. V8, on which Node is + built, supports only IA-32 and ARM processors. V8 is included in the + Node distribution. There are no other dependencies. +
+ ++./configure +make +make install+ +
+ Then have a look at the API documentation. +
+ +To run the tests
+ +make test+
@@ -144,39 +200,6 @@ Server running at http://127.0.0.1:8000/ current design.
-- git repo -
-- 2009.10.09 - node-v0.1.14.tar.gz -
- -- Node eventually wants to support all POSIX operating systems - (including Windows with MinGW) but at the moment it is only being - tested on Linux, Macintosh, and FreeBSD. The - build system requires Python 2.4 or better. V8, on which Node is - built, supports only IA-32 and ARM processors. V8 is included in the - Node distribution. There are no other dependencies. -
- --./configure -make -make install- -
- Then have a look at the API documentation. -
- -To run the tests
- -make test
@@ -229,5 +252,17 @@ git format-patch HEAD^ 2009.09.06 narwhal, node, v8cgi, thin/eventmachine