Skip to content

dknell/meteor-actionhero_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

actionhero_client - Meteor Smart Package

actionhero_client packaged for Meteor. This can be used to connect to an ActionHero API server. See the ActionHero Docs for more info.

How to install?

  1. Install meteorite
  2. mrt add actionhero_client

An example of how to use the actionhero_client to connect to your ActionHero API server:

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();
		});
	});
});

About

ActionHero Client packaged for Meteor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published