Skip to main content
This guide shows you how to install Workflow DevKit in a Hono application using Nitro as the build system.
1

Install dependencies

Install the required packages:
Nitro provides the build system needed to compile workflows. Learn more at nitro.build.
2

Configure Nitro

Create a nitro.config.ts file with the Workflow module:
nitro.config.ts
This configuration:
  • Enables the Workflow Nitro module
  • Routes all requests to your Hono app
3

Create your Hono app

Create src/index.ts with your Hono application:
src/index.ts
4

Update package.json scripts

Add development and build scripts:
package.json
5

Enable TypeScript support (Optional)

Add the Workflow TypeScript plugin to your tsconfig.json for IntelliSense:
tsconfig.json

How it works

The Hono + Nitro integration:
  • Uses Nitro’s build system to compile workflows
  • Generates workflow route handlers at .well-known/workflow/v1/*
  • Supports both development (with HMR) and production builds
  • Routes all non-workflow requests to your Hono app
  • Automatically handles workflow execution and resumption
  • Uses native Web API Request and Response objects

Example workflow

workflows/user-signup.ts

Development

Run the development server:
Trigger a workflow:

Production

Build and start the production server:

Next steps

Core Concepts

Learn about workflows and steps

Nitro Integration

Learn more about the Nitro integration