The Principal Dev โ€“ Masterclass for Tech Leads

The Principal Dev โ€“ Masterclass for Tech LeadsNov 27-28

Join



Inngest is the reliability layer for modern applications. It combines durable execution, events, and queues into a zero-infra platform with built-in observability.

Works with:

Read the documentation and get started in minutes.



On any serverless platform (Next.js, Deno Deploy, RedwoodJS, AWS Lambda, and anything else) and with no extra infrastructure:

๐Ÿ‘‹ Have a question or feature request? Join our Discord!


Getting started ยท Features ยท Version support ยท Contributing ยท Documentation


Getting started


Install Inngest:

npm install inngest

Or get it from JSR:

deno add jsr:@inngest/sdk

Writing functions

Write serverless functions and background jobs right in your own code:

import { Inngest } from "inngest";

const inngest = new Inngest({ id: "my-app" });

// This function will be invoked by Inngest via HTTP any time
// the "app/user.signup" event is sent to to Inngest
export default inngest.createFunction(
  { id: "user-onboarding-communication" },
  { event: "app/user.signup" },
  async ({ event, step }) => {
    await step.run("Send welcome email", async () => {
      await sendEmail({
        email: event.data.email,
        template: "welcome",
      });
    });
  }
);

Serving your functions

Inngest invokes functions via HTTP, so you need to serve them using an adapter for the framework of your choice. See all frameworks here in our docs. Here is an example using the Next.js serve handler:

// /pages/api/inngest.ts
import { Inngest } from "inngest";
// See the "inngest/next" adapter imported here:
import { serve } from "inngest/next";
import myFunction from "../userOnboardingCOmmunication"; // see above function

// You can create this in a single file and import where it's needed
const inngest = new Inngest({ id: "my-app" });

// Securely serve your Inngest functions for remote invocation:
export default serve(inngest, [myFunction]);

Sending events to trigger functions

// Send events
import { Inngest } from "inngest";
const inngest = new Inngest({ id: "my-app" });

// This will run the function above automatically, in the background
inngest.send("app/user.signup", {
  data: { email: "text@example.com", user_id: "12345" },
});

Features


Version support

The library works across browsers, Bun, Deno, Node, and Cloudflare Workers.

We support the LTS versions of these runtimes and the last 3 minor versions of TypeScript; once a runtime version drops out of LTS, any major, minor, or patch update to the inngest library may drop support for it, which will be mentioned in the patch notes.

Contributing

Check out CONTRIBUTING.md to get started.

Join libs.tech

...and unlock some superpowers

GitHub

We won't share your data with anyone else.