Skip to content

Instantly share code, notes, and snippets.

@IPRIT
Created April 11, 2015 12:14
Show Gist options
  • Select an option

  • Save IPRIT/2f24f7032cf966a231fa to your computer and use it in GitHub Desktop.

Select an option

Save IPRIT/2f24f7032cf966a231fa to your computer and use it in GitHub Desktop.
var args = process.argv.slice(2);
var net = require('net');
var strftime = require('strftime');
net.createServer(function(socket) {
socket.end(strftime('%F %R') + '\n');
}).listen(+args[0]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment