Skip to content

@oona/vlo / host / serve

Function: serve() ​

serve(options): Promise<ServeResult>

Defined in: sdk/ts/sdk/src/host/roles.ts:305

Binds a port, tells the host its own URL, then starts it. publicUrl is set to the listener's URL unless the options give one, so pushed tasks carry a working complete_url.

Parameters ​

options ​

ServeOptions

Returns ​

Promise<ServeResult>

Example ​

ts
import { serve } from "@oona/vlo/host";

const server = await serve({
  journal: "postgres://user:pass@localhost/app",
  workflows: [pipeline],
  activities: [render],
  auth: { token: "control-plane-token" },
  port: 4100,
});
console.log(server.url); // http://127.0.0.1:4100
await server.close();