actionhero_client packaged for Meteor. This can be used to connect to an ActionHero API server. See the ActionHero Docs for more info.
- Install meteorite
mrt add actionhero_client
var ah = new actionhero_client;
ah.connect({
host: 127.0.0.1,
port: 5000
});
ah.on("connected", function() {
ah.action("status", function(err, response, duration){
console.log("STATUS:");
console.log(" > uptime: " + response.uptime);
console.log(" ~ request duration: " + duration + "ms");
// myGreatAction would be a custom action created on your ActionHero API server
ah.actionWithParams("myGreatAction", {value: "ActionHero Rocks!"}, function(err, response, duration) {
console.log("myGreatAction response: " + response.message);
// Now let's disconnect
ah.disconnect();
});
});
});