Skip to content

Instantly share code, notes, and snippets.

@edsrzf
Created January 16, 2012 21:13
Show Gist options
  • Save edsrzf/1623078 to your computer and use it in GitHub Desktop.
Save edsrzf/1623078 to your computer and use it in GitHub Desktop.
IronMQ with Node.js example
var bs = require('nodestalker'),
client = bs.Client('mq-aws-us-east-1.iron.io:11300');
token = 'my token';
projectId = 'my project ID';
// authenticate
client.put('oauth ' + token + ' ' + projectId);
client.use('queue-name').onSuccess(function(data) {
console.log(data)
client.put('my job').onSuccess(function(data) {
console.log(data);
client.disconnect();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment