ActionHero is a multi-transport Node.JS API Server with integrated cluster capabilities 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.
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.
{% highlight bash %} curl "http://127.0.0.1:8080/api/" -d "action=actionsView" {% endhighlight %}ActionHero uses Primus to provided a robust and reliable nodejs websocket implementation. ActionHero web socket clients can fall back to long-polling and other transports to ensure they are connected. Primus allows you to choose the underlying websocket implementation of your choice.
{% highlight javascript %} var A = new ActionheroClient; A.connect(); A.action("actionsView", function(data){ console.log(data); }) {% endhighlight %}ActionHero ships with the ability to be a line TCP or TLS server. ActionHero clients can speak a wire protocol that sends 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.
{% highlight bash %} > telnet localhost 5000 Trying 127.0.0.1... Connected to localhost. {"welcome":"Hello! Welcome to the actionhero api"} > say myChatRoom hello {"ok"} {% endhighlight %}Most importantly, ActionHero's modular server architecture allows you to define your own servers and protocols. Learn how in the ActionHero documentation.