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 🙏

© 2026 – Pkg Stats / Ryan Hefner

nitro-processor

v0.1.2

Published

Decoupled background processing for Nitro servers backed by BullMQ

Readme

Nitro Processor

npm version npm downloads License Known Vulnerabilities

Looking for Nuxt? This package is for standalone Nitro and Vite + Nitro apps. For Nuxt, use nuxt-processor.

Scalable processing for Nitro

Note: This package is under very active development! Please consider creating issues if you run into anything!

Using an LLM? Documentation markdown is included in the package at node_modules/nitro-processor/docs/

Features

  • Dedicated processing: Workers run in a separate Node process – no coupling to your web server.
  • Scalability: Run multiple worker processes and instances across machines.
  • Simple DX: Define queues/workers using first-class helpers.

Sections

Install

npm install nitro-processor

Configuration

Register the module in nitro.config.ts (standalone Nitro) or vite.config.ts (Vite + Nitro plugin). Full reference: Configuration.

Standalone Nitro (nitro.config.ts)

import { defineConfig } from 'nitro/config'
import nitroProcessor from 'nitro-processor'

export default defineConfig({
  modules: [
    nitroProcessor({ workers: 'server/workers' }),
  ],
})

Vite + Nitro (vite.config.ts)

import { defineConfig } from 'vite'
import { nitro } from 'nitro/vite'
import nitroProcessor from 'nitro-processor'

export default defineConfig({
  plugins: [nitro()],
  nitro: {
    modules: [
      nitroProcessor({ workers: 'server/workers' }),
    ],
  },
})

You can also use a separate nitro.config.ts alongside the Vite plugin — see the configuration guide.

buildDir and the workers CLI

Dev workers are emitted at {buildDir}/dev/workers/index.mjs (default node_modules/.nitro/dev/workers/index.mjs). If you set a custom buildDir in Nitro config, pass it to the CLI:

npx nitro-processor dev --buildDir .nitro
# or
NITRO_PROCESSOR_BUILD_DIR=.nitro npx nitro-processor dev

Redis configuration

Configure Redis with Nitro runtime config.

| Phase | Env prefix | Example | | --- | --- | --- | | Dev / build | REDIS_* | REDIS_URL=redis://127.0.0.1:6379/0 | | Runtime (prod/Docker) | NITRO_REDIS_* | NITRO_REDIS_URL=redis://redis:6379/0 |

See Redis configuration for the full reference.

Define a queue and enqueue from your app

import { defineQueue } from '#processor'
// or: import { defineQueue } from 'nitro-processor/runtime'

export default defineQueue({
  name: 'hello',
})

Define a worker

import { defineWorker } from '#processor'
import type { Job } from '#bullmq'

export default defineWorker({
  name: 'hello',
  async processor(job: Job) {
    console.log('processed', job.name, job.data)
    return job.data
  },
})

Running

  • Start your Nitro app first (nitro dev or vite dev). This module generates a dedicated workers entry under {buildDir}/dev/workers/index.mjs (default node_modules/.nitro/dev/workers/index.mjs).
  • In development, run workers from that entry in a separate terminal.
nitro dev   # or: vite dev
npx nitro-processor dev

CLI

# runs all workers
npx nitro-processor dev

# run only specific workers
npx nitro-processor dev --workers=basic,hello

# custom buildDir (must match nitro.config.ts / vite.config.ts)
npx nitro-processor dev --buildDir .nitro

After building for production:

nitro build
node .output/server/workers/index.mjs

Durabull

See the Durabull guide.

Contribution

See CONTRIBUTING.md.

npm install
npm run dev:prepare
npm run ci