Created
January 16, 2012 21:13
-
-
Save edsrzf/1623078 to your computer and use it in GitHub Desktop.
IronMQ with Node.js example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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