actionhero
Version:
actionhero.js is a multi-transport API Server with integrated cluster capabilities and delayed tasks
218 lines (192 loc) • 12.8 kB
HTML
---
layout: learn-more
title: Home
---
<section class="learn-more-intro">
<div class="intro-body">
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<h2> </h2>
<h2>Learn More About actionhero</h2>
<a href="http://github.com/evantahler/actionhero">
<img src="/img/logo/actionhero_400.png" width="300" />
</a>
<p>actionhero.js is a multi-transport Node.JS API Server with integrated cluster capabilities and delayed tasks.</p>
<p>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.</p>
</div>
</div>
</div>
</div>
</section>
<section id="servers" class="container content-section text-center">
<div class="row">
<h2>Servers</h2>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/servers/web.html">Web</a></h4>
<p class="feature-description">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.</p>
<pre>curl "http://127.0.0.1:8080/api/" -d "action=actionsView"</pre>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/servers/websocket.html">Web Sockets</a></h4>
<p class="feature-description">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.</p>
<pre>var A = new ActionheroClient;
A.connect();
A.action("actionsView", function(data){ console.log(data); })</pre>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/servers/socket.html">Socket</a></h4>
<p class="feature-description">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.</p>
<pre>> telnet localhost 5000
Trying 127.0.0.1...
Connected to localhost.
{"welcome":"Hello! Welcome to the actionhero api}
> actionsView</pre>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/core/servers.html">Your Own</a></h4>
<p class="feature-description">Most importantly, actionhero's modular server architecture allows you to define your own servers and protocols. Learn how in <a href="/docs/">the actionhero documentation</a>.</p>
</div>
</div>
</section>
<section id="features" class="content-section text-center">
<div class="features-section">
<div class="container">
<h2>Features</h2>
<div class="row">
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/core/actions.html">Easy-To-Use Actions</a></h4>
<p class="feature-description">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.</p>
<pre>
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();
}
}
</pre>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/core/tasks.html">Built-In Tasks</a></h4>
<p class="feature-description">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.</p>
</div>
<pre>
api.tasks.enqueue(
"sendWelcomeEmail",
{to: 'evan@evantahler.com'},
'default',
function(err, 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(err){
if(err != null){ api.log(err, 'error'); }
next();
})
}
};
</pre>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/core/actionCluster.html">Cluster-Ready</a></h4>
<p class="feature-description">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 is able to scale from 1 worker on one server, to as big of a cluster as you need.</p>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/#about">Multiple Servers and Transports</a></h4>
<p class="feature-description">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.</p>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/servers/web.html#routes">Routing</a></h4>
<p class="feature-description">actionhero ships with a router to make mapping HTTP requests to your actions a breeze.</p>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="http://api-first.com">API First Development</a></h4>
<p class="feature-description">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.</p>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/core/chat.html">Chat</a></h4>
<p class="feature-description">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. Complete with middleware and extensions, you can create chat services, multi-player games, and more!</p>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/ops/production-notes.html">Clustered Deployment And 0-Downtime Binaries</a></h4>
<p class="feature-description">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.</p>
</div>
<div class="col-6 col-sm-6 col-lg-6">
<h4><a href="/docs/core/file-server.html">File Server</a></h4>
<p class="feature-description">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!</p>
</div>
</div>
</div>
</div>
</section>
<section id="community" class="container content-section text-center">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2>Community</h2>
<ul class="list-inline banner-social-buttons">
<li><a href="https://groups.google.com/forum/?fromgroups=#!forum/actionhero-js" class="btn btn-default btn-lg"></i> <span class="network-name">Mailing List</span></a></li>
<li><a href="https://gitter.im/evantahler/actionhero" class="btn btn-default btn-lg"> <span class="network-name">Chat</span></a></li>
<li><a href="https://twitter.com/actionherojs" class="btn btn-default btn-lg"> <span class="network-name">Twitter</span></a></li>
<li><a href="https://github.com/evantahler/actionhero/issues" class="btn btn-default btn-lg"> <span class="network-name">Issues</span></a></li>
<li><a href="https://github.com/evantahler/actionhero/releases" class="btn btn-default btn-lg"> <span class="network-name">Releases</span></a></li>
</ul>
<br /><br /><br />
<h2>Downloads</h2>
<ul class="list-inline banner-social-buttons">
<li><a href="https://www.npmjs.org/package/actionhero" class="btn btn-default btn-lg"><i class="fa fa fa-cloud-download fa-fw"></i> <span class="network-name">NPM</span></a></li>
<li><a href="https://github.com/evantahler/actionhero" class="btn btn-default btn-lg"><i class="fa fa fa-github fa-fw"></i> <span class="network-name">Github</span></a></li>
</ul>
<br /><br /><br />
<h2>Learn</h2>
<ul class="list-inline banner-social-buttons">
<li><a href="https://github.com/evantahler/actionhero-client" class="btn btn-default btn-lg"><i class="fa fa fa-github fa-fw"></i> <span class="network-name"> Client</span></a></li>
<li><a href="https://github.com/evantahler/actionhero-tutorial" class="btn btn-default btn-lg"><i class="fa fa fa-github fa-fw"></i> <span class="network-name">Tutorial</span></a></li>
<li><a href="/docs" class="btn btn-default btn-lg"><i class="fa fa fa-book fa-fw"></i> <span class="network-name">Documentation</span></a></li>
<li><a href="http://demo.actionherojs.com" class="btn btn-default btn-lg"><i class="fa fa fa-flash fa-fw"></i> <span class="network-name">Demo</span></a></li>
</ul>
<br /><br /><br />
<h2>Companies Using actionhero</h2>
<div class="companyContanier">
<a target="_blank" href="https://www.taskrabbit.com">
<img class="comanyLogo" src="/img/companies/taskrabbit.png" alt="Task Rabbit" />
</a>
<a target="_blank" href="http://www.delicioushat.com">
<img class="comanyLogo" src="/img/companies/delicious_hat.png" alt="Delicious Hat" />
</a>
<a target="_blank" href="http://www.madglory.com">
<img class="comanyLogo" src="/img/companies/madglory.png" alt="MadGlory Interactive" />
</a>
<a target="_blank" href="http://www.roamltd.com">
<img class="comanyLogo" src="/img/companies/roam.png" alt="Roam Interactive" />
</a>
<a target="_blank" href="http://www.yvolver.com/">
<img class="comanyLogo" src="/img/companies/yvolver.png" alt="Yvolver" />
</a>
<a target="_blank" href=" http://www.useDopamine.com">
<img class="comanyLogo" src="/img/companies/dopamine.png" alt="Dopamine" />
</a>
<a target="_blank" href=" http://www.bluesunrise.com">
<img class="comanyLogo" src="/img/companies/bluesunrise.png" alt="bluesunrise" />
</a>
<a target="_blank" href=" http://www.igniter.io">
<img class="comanyLogo" src="/img/companies/igniter.png" alt="igniter" />
</a>
</div>
</div>
</div>
</section>
<section id="community" class="container content-section text-center">
<div class="row">
</div>
</section>