Skip to content

Instantly share code, notes, and snippets.

@heapwolf heapwolf/34.js
Created Aug 7, 2012

What would you like to do?
var net = require('net');
var fs = require('fs');
var path = require('path');
var sock;
var port = 8089;
var log = path.join(__dirname + '/log.txt');
if (process.argv[2] === 'server') {
  sock = new net.createServer(function(socket) {
else {
  sock = new net.Socket();
  process.stdin.on('data', function(d) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.