actionhero

The Reusable, Scalable, and Quick node.js API Server.

About actionhero

actionhero.js is a multi-transport API Server with integrated cluster capabilites and delayed tasks.

actionhero was built from the ground up to include all the features you expect from a modern API framework. This includes all the features listed below and more. actionhero also knows when to get out of the way to allow you to customize your stack to fit your needs.

Servers

Web

actionhero can act as a HTTP or HTTPs API server. With integrated routing, it is easy to create RESTful resources. actionhero can also serve static files.

curl "http://127.0.0.1:8080/api/" -d "action=actionsView"

Web Sockets

actionhero uses Faye to provided a robust and reliable websocket implementation. actionhero web socket clients can fall back to long-polling and other transports to ensure they are connected. actionhero does not require that a client stay connected to the same node.

var A = new actionheroClient;
A.action("actionsView", function(data){ console.log(data); })

Socket

actionhero ships with the ability to be a line TCP or TLS server. actionhero clients can speak a wire protocol or send lines of JSON. Actions can be processed asynchronously and in parallel. The API server and the built-in chat system provide all you need for a communication or game application.

> telnet localhost 5000
Trying 127.0.0.1...
Connected to localhost.
{"welcome":"Hello! Welcome to the actionhero api}
> actionsView

Your Own

Most importantly, actionhero's modular server architecture allows you to define your own servers and protocols. Learn how on the actionhero WIKI

Features

Easy-To-Use Actions

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.

Built-In Tasks

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 sytem is powerd by Resque, so it is compatible with a number of other applications and frameworks.

Cluster-Ready

actionhero uses Faye and Redis to store and share data. With first-class cache functions, decentralized communications, and distributed workers, you can be sure that your application is able to scale from 1 worker on one server, to as big of a cluster as you need.

Multiple Servers and Transports

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 included). actionhero also easily lets you write your own servers to handle custom transports.

Routing

actionhero ships with a router to make mapping HTTP requests to your actions a breeze.

API First Development

actionhero makes API-First development very easy by enforcing a strict separation of views and application logic. actionhero also makes modularizing your application easy with simple clustering and easy-to-use background tasks.

Chat

actionhero (optionally) facilitates real-time communication not only from server-to-client, but also client-to-client! actionhero's chat sub-system allows for streaming of both public and private messages between clients.

Clustered Deployment And 0-Downtime Binaries

It is simple to deploy actionhero with our included binaries. You can launch your server as a single instance or as part of a node.js cluster.

File Server

Every respectable framework 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 excellent file server which can live in parallel with your API routes allowing for a fully featured server. No nginx required!

Try actionhero Now

                npm install actionhero

                ./node_modules/.bin/actionhero generate

                npm start
                
© 2014 | @evantahler | Theme | Logo