Features

Easy-To-Use Actions

Action Docs

With ActionHero, you create 'actions' which can respond to any type of connection. They process incoming parameters and offer a response to the client. ActionHero takes care of routing and responding to each connection type for you.

{% highlight javascript %} exports.action = { name: 'randomNumber', description: 'I generate a random number', action.inputs: { 'required' : [], 'optional' : [] }, outputExample: {randomNumber: 123} run: function(api, data, next){ data.response.randomNumber = Math.random(); next(); } } {% endhighlight %}

Built-In Tasks

Task Docs

Background tasks are first-class citizens in ActionHero. You can enqueue a task from anywhere in the application. Tasks can be recurring or single-run. ActionHero's task system is powered by Resque, so it is compatible with a number of other applications and frameworks.

{% highlight javascript %} api.tasks.enqueue( "sendWelcomeEmail", {to: 'evan@evantahler.com'}, 'default', function(error, toRun){ // done! }); var task = { name: "sendWelcomeEmail", description: "I will send a new user a welcome email", queue: "default", frequency: 0, run: function(api, params, next){ api.sendEmail(params.email, function(error){ if(error){ api.log(error, 'error'); } next(); }) } }; {% endhighlight %}

Cluster-Ready

Action Cluster Docs

ActionHero uses Redis to store and share data. With first-class cache functions, decentralized communications, and distributed workers, you can be sure that your application to as big of a cluster as you need.

Multiple Servers and Transports

Introduction Docs

The ActionHero API makes it simple to create a traditional HTTP(S) API, but it also lets you easily extend your API to TCP and websocket clients, all of which are included of course. ActionHero also easily lets you write your own servers to handle custom transports, ensuring you can connect with & federate all your existing services.

Routing

Route Docs

ActionHero ships with a robust router to make mapping HTTP requests to your actions a breeze. Easily wire-up your actions in RESTful patterns ensuring that your client applications can easily connect. Wildcard matching, URL-decomposition, and query extraction are all built in.

API First Development

www.api-first.com

ActionHero makes API-First development easy by enforcing a strict separation of views and application logic and removing barriers to API creation. Versioning your actions is simple and integrates well with Agile or XP team workflows.

Chat

Chat Docs

ActionHero (optionally) facilitates real-time communication not only from server-to-client, but also client-to-client! ActionHero's chat system allows for streaming of both public and private messages between clients. Complete with middleware and extensions, you can create chat services, multi-player games, and more!

Deployment Tools

Deployment Docs

It is simple to deploy ActionHero with our included CLI tools. You can launch your server as a single instance or as part of a larger deployment cluster. Tools for 0-downtime deployments and robust monitoring and logging hooks make ActionHero a dream platform for your operations team.

File Server

File Server Docs

Every server needs to serve files to its clients (even those that don't speak HTTP), and ActionHero is no exception. Configured to asynchronously stream file contents, ActionHero provides an robust file server which can live in parallel with your API, allowing for a fully featured server.

Localization

Localization Docs

ActionHero is deeply integrated with `i18n` to allow you to customize every string your clients might see. You can customize how language is determined for your API consumers, and respond to your clients in the way they are used to. This includes modular error responses and API input hints.