This example hosts a CopilotKit v2 runtime using Express and the single-route helper.
pnpm -C ../../ installCreate a local env file:
cp .env.example .envSet OPENAI_API_KEY in .env.
pnpm -C ../../ --filter node-express example-devThe runtime will be available at:
http://localhost:4000/api/copilotkit
pnpm -C ../../ --filter node-express example-build- This example uses
createCopilotEndpointSingleRouteExpress. - TypeScript uses
moduleResolution: node16to resolve the@copilotkit/runtime/expressexport correctly.