Skip to content

TypeScript

The TypeScript client uses HTTP/JSON.

import { fetchHello, PlatformClient } from '@platform/hello-client';
const { message, source } = await fetchHello('http://template-api.localhost');
const client = new PlatformClient({ baseUrl: 'http://template-api.localhost' });
await client.healthz();
await client.hello();

fetchHello and useHello are one-call helpers. PlatformClient covers the full surface (hello, healthz, and the spec).

Needs Node 22+.

Terminal window
pnpm add @platform/hello-client

npm install @platform/hello-client and yarn add @platform/hello-client also work.