@lesto/runtime
v0.2.0
Published
Lesto's transport tier — the node:http server that serves a Lesto app, plus a queue-worker runner.
Readme
@lesto/runtime
Lesto's transport tier — the node:http server that serves a Lesto app, plus a queue-worker runner.
Part of Lesto, the batteries-included, agent-native fullstack framework.
bun add @lesto/runtimeimport { serve, runWorker } from "@lesto/runtime";
// Stand a real node:http server in front of an assembled app.
const server = await serve(app, { port: 0 });
// server.port is the bound port; await server.close() to stop.
// The other long-lived process: a queue-worker runner.
const worker = runWorker(queue, { concurrency: 4 });
// on SIGTERM: await worker.stop(); // graceful drain