The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →To run background work with Inngest, install its TypeScript SDK, define an event-triggered function, serve that function through your framework’s Inngest handler, and send the event that starts it. The steps below follow the TypeScript SDK v4 documentation and the official end-to-end quick start, which uses Next.js App Router. If your app uses another framework, connect the function with that framework’s matching Inngest HTTP handler rather than copying the Next.js route unchanged.
How Inngest connects events to background work
Inngest’s vendor documentation describes it as “an event-driven durable execution platform that lets you write reliable background jobs, scheduled tasks, and multi-step workflows in TypeScript without any additional infrastructure.” That is the vendor’s description, not an independent comparison with other job systems.
As an Amazon Associate I earn from qualifying purchases.
The basic flow is straightforward: your app sends a named event, an Inngest function registered to handle that event starts, and work inside durable steps can be resumed or retried. The application must expose the function through an Inngest serve handler; defining a function alone does not make it available to run. The official quick start demonstrates this flow with Next.js App Router.
Install the TypeScript SDK and create a shared client
The SDK documentation lists Node.js, Bun, Deno, and edge runtimes as supported. Install the package in your project:
#1 Best Overall
npm install inngest
Create a client module and initialize it once with a stable application ID. The exact file path is a project convention; the important part is that your functions and serving handler import the same client.
import { Inngest } from "inngest";
export const inngest = new Inngest({ id: "my-app" });
The package installation command and client initialization follow the official TypeScript SDK reference. Replace my-app with an ID that identifies your application.
Rank #2
- TypeScript implements a superset of syntax for strictly typed development, facilitating deep static analysis and enhanced development environment integration. The compiler translates source into standard script formats, ensuring parity across any runtime.
- TypeScript is ideal for front-end developers, full-stack engineers, and software architects who build large-scale web applications. It serves those looking to improve code excellence, reduce bugs through static checking, and maintain complex projects more.
- Lightweight, Classic fit, Double-needle sleeve and bottom hem
Define a function with an event trigger
An Inngest function needs a stable function ID and a trigger. In the quick-start example, the trigger listens for the app/task.created event. Put work you want Inngest to track and retry inside named step.run() calls.
export const processTask = inngest.createFunction(
{ id: "process-task" },
{ event: "app/task.created" },
async ({ event, step }) => {
const result = await step.run("process-task", async () => {
// Perform retryable work using event.data.
return { taskId: event.data.taskId };
});
await step.sleep("wait-before-follow-up", "1s");
return result;
},
);
This is an illustrative shape for the quick-start concepts: adapt the event data and work to your application. A successful step.run() saves its result. If a later part of the function fails and retries, completed earlier steps remain saved rather than being rerun as ordinary uncheckpointed code. A thrown error in a step can cause that step to retry. The function reference documents four retries by default, with retry configuration allowed from zero through twenty; this describes Inngest’s documented function behavior, not a guarantee that arbitrary code outside steps is checkpointed.
step.sleep() pauses the workflow for the requested duration without keeping the originating HTTP request open. In the quick start, the pause is one second. See the function reference for the documented function and step behavior.
Serve and register the function in your framework
The function must be registered with an Inngest serving handler so Inngest can discover and invoke it. The official end-to-end example uses Next.js App Router and exposes its handler at /api/inngest. In that route, configure the Inngest Next.js handler with the shared client and the function or functions to serve, then export the HTTP methods required by the handler, as shown in the Next.js quick start.
For Express, another framework, or a different runtime, use the corresponding Inngest HTTP handler and its framework-specific route setup. Do not assume that the Next.js route file or exports can be pasted into another framework unchanged; the quick start directs readers to select the matching handler.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Send the event that starts the job
Once the handler serves the registered function, the application can send the matching event. The quick start sends app/task.created from an application route. Its event name must match the function trigger, and its data should include the values the function needs.
Best Value
await inngest.send({
name: "app/task.created",
data: { taskId: "task-123" },
});
Sending the event starts a run of the registered function; it does not make the function’s entire execution part of the request that sent the event. Keep the event payload focused on the information needed by the workflow.
Verify the run locally with the Inngest Dev Server
The quick start includes local verification so you can inspect what happened before deploying. Run the Inngest Dev Server using the current command and setup instructions in the Dev Server documentation, then start your application and send a sample event. The getting-started guide describes the local trace UI at http://localhost:8288.
- Start the Dev Server and the app route that serves the Inngest handler.
- Send an event with the same name as the function trigger, such as
app/task.created. - Open the local trace UI and locate the run created by that event.
- Inspect the event payload, step output, timeline, and completion state to confirm that the function followed the expected path.
The trace is useful for checking that event registration, handler serving, step execution, and pauses fit together. If a run does not appear, check that the app’s handler is running, that the function is registered there, and that the sent event name matches its trigger.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




