NeloRequest-owned work for TypeScript

Keep the work
inside the request.

Nelo keeps child tasks, cooperative cancellation, scoped resources, and response delivery within the request that started them, while preserving standard Request and Response APIs.

62 tests04 phases0 starsApache 2.0

app.ts

Handler Scope
app.ts
import { Nelo } from "nelo";

const app = new Nelo();

app.get("/users/:id", async (context) => {
  const user = context.fork("user", (signal) =>
    fetchUser(context.params.id!, { signal })
  );

  const feed = context.fork("feed", (signal) =>
    fetchFeed(context.params.id!, { signal })
  );

  return context.json({
    user: await user,
    feed: await feed,
  });
});
requesthandlerdelivery

Tasks, resources, and delivery

One request. One lifetime.

Understand the model
01

Owned tasks

Start child work with a parent scope and pass the same cancellation signal through it.

02

Scoped resources

Register acquisition and cleanup together, then release each resource once in reverse order.

03

Delivery lifetime

Keep streams and their resources alive after the handler returns, until delivery actually ends.

Live Nelo API

Run the framework, not a mock.

Every action calls /api/nelo on this deployment. The route creates a Nelo app, executes request-owned work, and returns lifecycle data from the real server runtime.

Start two named tasks and join both before the request settles.

Ready.

Choose a scenario and run the live API.