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).
Install
Section titled “Install”Needs Node 22+.
pnpm add @platform/hello-clientnpm install @platform/hello-client and yarn add @platform/hello-client
also work.
Needs Node 22+.
pnpm add @platform/hello-clientnpm install and yarn add work the same way.
Install Node 22+ (LTS). In a new PowerShell:
pnpm add @platform/hello-clientOr npm install @platform/hello-client. Restart the terminal after installing
Node if the command is not found.