Skip to content

Instantly share code, notes, and snippets.

@helayzhang
Created February 16, 2014 14:06
Show Gist options
  • Save helayzhang/9034713 to your computer and use it in GitHub Desktop.
Save helayzhang/9034713 to your computer and use it in GitHub Desktop.
Simple Echo server writen by node.js
var net = require('net');
var server = net.createServer(function (socket) {
socket.write('Echo server\r\n');
socket.pipe(socket);
});
server.listen(8888, '0.0.0.0');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment