Browse Source

improve hello-world example on website

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
0248c87ec7
  1. 11
      doc/index.html

11
doc/index.html

@ -65,12 +65,13 @@ Server running at http://127.0.0.1:8124/</pre>
<pre> <pre>
var net = require('net'); var net = require('net');
net.createServer(function (socket) {
var server = net.createServer(function (socket) {
socket.write("Echo server\r\n"); socket.write("Echo server\r\n");
socket.on("data", function (data) { socket.pipe(socket);
socket.write(data); })
});
}).listen(8124, "127.0.0.1"); server.listen(8124, "127.0.0.1");
</pre> </pre>
<p> <p>

Loading…
Cancel
Save