Community생산성 & 협업github.com

inngest/inngest-setup

TypeScript 프로젝트에 지속적 실행(durable execution)을 추가할 때 사용 — 재시도 가능한 웹훅 핸들러, 충돌에 강한 백그라운드 작업, 예약된 태스크 또는 단일 요청을 넘어 실행되는 장기 워크플로우를 구축합니다. Inngest SDK 설치, 클라이언트 구성, 환경 변수, 서브 엔드포인트(Next.js, Express, Hono, Fastify), connect-as-worker 모드 및 로컬 개발 서버를 다룹니다.

inngest-setup란 무엇인가요?

이 기술은 TypeScript 기반 프로젝트에 Inngest를 사용하여 지속적 실행(durable execution)을 설정하는 방법을 제공합니다. Inngest는 재시도 가능한 웹훅 핸들러, 충돌 후에도 유지되는 백그라운드 작업, 예약된 태스크, 단일 요청 수명을 초과하는 장기 실행 워크플로우를 구축할 수 있게 해줍니다. 주요 내용으로는 Inngest SDK 설치, 클라이언트 구성, 환경 변수 설정, 다양한 프레임워크(Next.js, Express, Hono, Fastify)에서의 serve 엔드포인트 구현, connect-as-worker 모드 사용법, 그리고 로컬 개발 서버 실행 방법을 다룹니다. 이 기술은 특히 오류 처리와 재시도 로직을 내장하여 안정적인 백그라운드 작업 처리가 필요한 개발자에게 유용하며, 별도의 인프라 설정 없이 기존 프로젝트에 쉽게 통합할 수 있습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/inngest/inngest-skills/tree/main/skills/inngest-setup

Installed? Explore more 생산성 & 협업 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

inngest-setup은(는) 무엇을 하나요?

TypeScript 프로젝트에 지속적 실행(durable execution)을 추가할 때 사용 — 재시도 가능한 웹훅 핸들러, 충돌에 강한 백그라운드 작업, 예약된 태스크 또는 단일 요청을 넘어 실행되는 장기 워크플로우를 구축합니다. Inngest SDK 설치, 클라이언트 구성, 환경 변수, 서브 엔드포인트(Next.js, Express, Hono, Fastify), connect-as-worker 모드 및 로컬 개발 서버를 다룹니다.

설치

npm install inngest

클라이언트 설정

import { Inngest } from "inngest";

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

환경 변수

.env.local 파일에 다음을 추가하세요:

INNGEST_EVENT_KEY=your-event-key
INNGEST_SIGNING_KEY=your-signing-key

서브 엔드포인트 (Next.js)

app/api/inngest/route.ts:

import { serve } from "inngest/next";
import { inngest } from "@/lib/inngest";

export const { GET, POST, PUT } = serve({
  client: inngest,
  functions: [
    // 함수 등록
  ],
});

서브 엔드포인트 (Express)

import express from "express";
import { serve } from "inngest/express";
import { inngest } from "./lib/inngest";

const app = express();
app.use(express.json());

app.use("/api/inngest", serve({
  client: inngest,
  functions: [
    // 함수 등록
  ],
}));

app.listen(3000);

서브 엔드포인트 (Hono)

import { Hono } from "hono";
import { serve } from "inngest/hono";
import { inngest } from "./lib/inngest";

const app = new Hono();

app.route("/api/inngest", serve({
  client: inngest,
  functions: [
    // 함수 등록
  ],
}));

서브 엔드포인트 (Fastify)

import Fastify from "fastify";
import { serve } from "inngest/fastify";
import { inngest } from "./lib/inngest";

const app = Fastify();

app.register(serve({
  client: inngest,
  prefix: "/api/inngest",
  functions: [
    // 함수 등록
  ],
}));

Connect-as-worker 모드

import { Inngest } from "inngest";
import { connect } from "inngest/connect";

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

connect({
  client,
  functions: [
    // 함수 등록
  ],
});

로컬 개발 서버

npx inngest-cli dev

또는 package.json에 스크립트를 추가하세요:

{
  "scripts": {
    "dev": "inngest-cli dev"
  }
}

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

inngest/inngest-durable-functions

Use when building functions that must survive process crashes, retry automatically on failure, run on a schedule, react to events, or maintain state across infrastructure failures — e.g., webhook handlers that drop events, flaky cron jobs, background jobs that fail mid-execution, or workflows that need to resume where they left off. Covers Inngest function configuration, triggers (events, cron, invoke), step execution and memoization, idempotency, cancellation, error handling, retries, logging, and observability.

inngest/inngest-events

Use when designing event-driven workflows, decoupling services, implementing fan-out patterns (one trigger, many downstream handlers), implementing idempotent event handling with IDs (24-hour dedupe window), or handling at-least-once delivery from external sources like Stripe webhooks. Covers Inngest event schema, payload format, naming conventions, IDs for idempotency, the ts param, fan-out patterns, and system events like inngest/function.failed.

inngest/inngest-middleware

Use when adding cross-cutting concerns to durable functions — structured logging or tracing across all functions, error tracking with Sentry, payload encryption for sensitive data, dependency injection of clients (DB, Stripe, etc.) into function handlers, custom telemetry, or behavior that should apply uniformly across many functions. Covers Inngest middleware lifecycle, creating custom middleware, dependencyInjectionMiddleware, @inngest/middleware-encryption, @inngest/middleware-sentry, and custom middleware patterns.

inngest/inngest-steps

Use when implementing delays that must survive process restarts (e.g., 24-hour cart abandonment, scheduled follow-ups), waiting for human approval or external events with timeouts (review gates, webhook callbacks, async API completion), polling external services without losing state on crashes, calling other functions and awaiting their results, memoizing expensive operations so they don't re-run on retry, or running async work in parallel inside a workflow. Covers Inngest step methods: step.run, step.sleep, step.waitForEvent, step.waitForSignal, step.sendEvent, step.invoke, step.ai, plus patterns for loops and parallel execution.

관련 스킬