Hello World
A minimal worker that returns a JSON response.
import type { ExportedHandler } from "kyushu-types";
export default { async fetch() { return { status: 200, headers: { "content-type": "application/json" }, body: JSON.stringify({ hello: "world" }), }; },} satisfies ExportedHandler;Try it
Build and run the worker.
kyu build && kyu runThen send a request to test it.
curl http://localhost:5987