c15t
/
Select a framework
Nitro Quickstart
Writing Runners
Configuration
Deployment
Orchestration
Advanced Topics
OSS
Contributing
License
C15T Logo
DocsChangelog
xbskydiscordgithub0
c15t
/
Select a framework
Nitro Quickstart
Writing Runners
Configuration
Deployment
Orchestration
Advanced Topics
OSS
Contributing
License
home-2Docs
chevron-rightFrameworks
chevron-rightNitro
chevron-rightConfiguration

Configuration

Configure Runners in Nitro applications

Complete configuration options for the Runners Nitro module.

Basic Configuration

import { defineConfig } from "nitro/config";

export default defineConfig({
  modules: ["runners/nitro"],
  runners: {
    pattern: ["src/**/*.ts", "runners/**/*.ts"],
    region: process.env.RUNNER_REGION || "us-east-1",
  },
});

Configuration Options

pattern

File patterns to scan for runners. Defaults to ["src/**/*.ts", "runners/**/*.ts"].

export default defineConfig({
  modules: ["runners/nitro"],
  runners: {
    pattern: [
      "src/**/*.ts",
      "runners/**/*.ts",
      "tests/**/*.ts", // Custom pattern
    ],
  },
});

region

Region identifier for runner context. Can be set via environment variable.

export default defineConfig({
  modules: ["runners/nitro"],
  runners: {
    region: process.env.RUNNER_REGION || "us-east-1",
  },
});

Environment Variables

VariableDescriptionDefault
RUNNER_REGIONRegion identifier"us-east-1"
DEBUGEnable debug loggingfalse
RUNNERS_DEBUGEnable runner debug loggingfalse

Build Configuration

The module automatically:

  • Extracts schemas at build time
  • Bundles runners for optimal performance
  • Creates virtual handlers for API routes

Custom Build Directory

export default defineConfig({
  modules: ["runners/nitro"],
  buildDir: ".nitro", // Custom build directory
});

Development Mode

In development, the module:

  • Watches for runner file changes
  • Rebuilds incrementally
  • Externalizes runner bundles to prevent reloads

Production Mode

In production, the module:

  • Performs one-time build
  • Optimizes bundles
  • Pre-extracts schemas

Next Steps

  • Learn about Deployment
  • Check Quickstart for setup guide
Runners brings execution, reliability, and distribution to async TypeScript. Build tests and checks that can run locally, in CI, or distributed across regions with ease.
Product
  • Documentation
  • Components
Company
  • GitHub
  • Contact
Legal
  • Privacy Policy
  • Cookie Policy
runners