Hello world
The minimal starter — typed input, structured logging, JSON out.
import fn from "@hostfunc/sdk";
// HTTP endpoint. POST { "name": "Ada" } — or GET ?name=Ada
export async function main(input: { name?: string }) {
const name = input.name?.trim() || "world";
fn.log("info", "hello.invoked", { name });
return {
message: `hello, ${name}`,
invokedAt: new Date().toISOString(),
};
}