The reusable, scalable, and quick node.js API server for stateless and stateful applications

npmnpmNPMGitHub stars

To the Rescue

No matter what you are building,
Actionhero is here to save the day.

APIs

The actionhero framework is one of the fastest ways to get started with a REST API - Routes, Versions, Testing and Translation tool are all included.


Internet of Things

Actionhero's small footprint and stateful server options make it ideal for IOT applications where as much logic as possible is offloaded to the server.


Real Time Chat

Actionhero includes all the modern tools you need for a highly-available realtime applications. Actionhero can work in a cluster to handle all the clients you can throw at it.


Games & Apps

Actionhero was built to serve the same APIs across multiple protocols. Do your games speak both HTTP and Websockets? Actionhero has got you covered.


...and a whole lot more!

Get started in seconds

# Generate a new Project
npx actionhero generate
npm install
npm run dev # <-- I automatically notice changes and restart, as well as compiling .ts files

# Use the actionhero CLI
(npx) actionhero generate-action --name my_action
(npx) actionhero generate-task --name my_task --queue default --frequency 0

# Test
npm test

# To deploy your app
npm run build
npm run start

Create an Action

import { Action, ParamsFrom } from "actionhero";

export class Greeting extends Action {
  name = "greeting";
  description = "I say hello";
  inputs = {
    firstName: { required: true },
  };
  outputExample = { message: "Hello, Evan!" };

  async run({ params }: { params: ParamsFrom<Greeting> }) {
    return { message: `Hello, ${params.firstName}` };
  }
}

Create a Task

import { Task, task, ParamsFrom } from 'actionhero'

export class WelcomeEmailTask extends Task {
  name = 'sendWelcomeEmail'
  description = 'I send an email'
  frequency = 0
  queue = 'default'
  inputs = {
    email: { required: true },
  };

  async run (params: ParamsFrom<WelcomeEmailTask>) {
    await api.sendEmail(params.email)
  }
}

// to use it
await task.enqueue("sendWelcomeEmail", {email: 'evan@actionherojs.com'});

Plays Well With Others

Use Actionhero around your workflow and preferred tools.

You've Got the Power

Actionhero was built from the ground up to include all the features you expect from a modern API framework. Written in Typescript, Actionhero makes it easy to build a modern API server with ES6 features like Async/Await... and it also knows when to get out of the way so you can customize your stack to fit your needs.

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.


View Sample

Built-in Tasks

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


View Sample

Cluster-Ready

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.


View Sample

Routing

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


View Sample

API-First Development

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.


Operations Tools

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.


Chat

The Actionhero API makes it simple to create a 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!


View Sample

File Server

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.


Trusted by Top Companies and Organizations


Solutions

Actionhero was built from the ground up to include all the features you expect from a modern API framework.

Open Source


The Actionhero server is open source, under the Apache-2 license


Actionhero runs on Linux, OS X, and Windows


You always have access to the Actionhero team via Slack and Github



Premium Training & Review


We provide support for corporate & nonprofit customers starting at a flat rate of $200/hr. Our services include:


  • Remote training for your team
  • Code Reviews
  • Best Practices Audits
  • Custom plugin & Feature Development

We have packages appropriate for all company sizes. Contact us to learn more.


Premium Training & Review


We provide support for corporate & nonprofit customers starting at a flat rate of $200/hr. Our services include:


  • Remote training for your team
  • Code Reviews
  • Best Practices Workshops
  • Custom plugin & Feature Development

We have packages appropriate for all company sizes. Contact us to learn more.


Enterprise


For larger customers in need of a support contract, we offer an enterprise plan including everything in the Premium plan plus:


  • 24/7 access to core members of the Actionhero Team
  • Emergency response packages
  • Deployment support
  • ...and custom development against Actionhero’s core as needed.

Ready to become the hero your project needs?