Skip to content

Instantly share code, notes, and snippets.

@lionep
Last active August 28, 2015 21:38
Show Gist options
  • Save lionep/6e2c5e2c15bdb868adac to your computer and use it in GitHub Desktop.
Save lionep/6e2c5e2c15bdb868adac to your computer and use it in GitHub Desktop.
'use strict';
var net = require('net');
var kue = require('kue');
var app = {};
app.$queue = kue.createQueue();
var job = app.$queue.create('stream-demo').save();
job.on('complete', function(socket) {
console.log('Stream init...');
var client = net.connect({
path: socket
}, function() {
client.on('data', function(buffer) {
console.log(buffer.toString());
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment