npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

inngest

v3.26.1

Published

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

Downloads

336,712

Readme

Inngest enables serverless event-driven queues, background jobs, and scheduled jobs for TypeScript. Works with any framework and platform.

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

  • ⚡ Write background jobs
  • 🕐 Create scheduled and cron jobs
  • ♻️ Build serverless queues
  • 🪜 Write complex step functions
  • 🚘 Build serverless event-driven systems
  • 🪝 Reliably respond to webhooks, with retries and payloads stored for history

👋 Have a question or feature request? Join our Discord!

Getting started

Install Inngest:

npm install inngest  # or yarn add inngest

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",
      });
    });
  }
);
  • Functions are triggered by events which can be sent via this SDK, webhooks, integrations, or with a simple HTTP request.
  • When a matching event is received, Inngest invokes the function automatically, with built-in retries.

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: "[email protected]", user_id: "12345" },
});
  • Events can trigger one or more functions automatically, enabling you to fan-out work.
  • Inngest stores a history of all events for observability, testing, and replay.

Features

  • Fully serverless: Run background jobs, scheduled functions, and build event-driven systems without any servers, state, or setup
  • Works with your framework: Works with Next.js, Redwood, Express, Cloudflare Pages, Nuxt, Fresh (Deno), and Remix
  • Deploy anywhere: Keep deploying to your existing platform: Vercel, Netlify, Cloudflare, Deno, Digital Ocean, etc.
  • Use your existing code: Write functions within your current project and repo
  • Fully typed: Event schemas, versioning, and governance out of the box
  • Observable: A full UI for managing and inspecting your functions

Contributing

Check out CONTRIBUTING.md to get started.