Skip to main content
Nelkap doesn’t run your code on its own servers. Your workflows stay in your app, next to your database and your other code. Each time a run has work to do, Nelkap sends a POST request to your app, and the SDK runs the workflow right there. That request arrives at your project’s endpoint: one route that you add to your app and that passes each request to nelkap.handle. This section shows how to add that route in your framework, from the keys to your first run.

Choose your framework

Next.js

A route handler in the App Router.

React Router

A resource route, in framework mode.

SvelteKit

A +server.ts endpoint.

Nuxt

A server route in the server folder.

Astro

An endpoint rendered on demand.

Hono

A route on a Hono app running on Node.js.

Express

A route that turns Express’s request into a standard one.

Other frameworks

nelkap.handle takes a standard web Request and returns a standard Response. Any framework that gives you the incoming request in that form works the same way: add a POST route, and return what handle returns.
The SDK needs Node.js 22 or later.

How handle works

Each call from Nelkap carries the workflow to run, the run’s payload, and the steps already saved. handle then does three things:
  1. It checks that the call carries your project’s secret. If it doesn’t, it answers 401, and nothing runs.
  2. It looks for the workflow among the ones you registered. If your app doesn’t have it, it answers 404.
  3. It answers 202 right away, then runs the workflow in the background, saving each step as it finishes.
Answering first means Nelkap never waits for your workflow, however long it takes.

Serverless hosts

Hosts like Vercel can stop your code as soon as the response is sent. Since handle answers before the workflow runs, the run would stop with it. To keep it going, pass your host’s waitUntil to handle:
Each framework page shows the right waitUntil for its hosts.

Deployment

Your endpoint must be a public HTTPS URL that answers without a sign-in. Deployment lists what it needs, how Nelkap retries a call, and how your host’s time limits play out.