Quickstarts
Server App
Publish a dynamic app with a Userland server entrypoint.
For agents: Add
runtime.server_entry, setfallbacktoserver, and export a default server module withfetch(request, ctx).
Files
manifest.userland.json
public/index.html
server/index.js
Server
export default {
async fetch(request, ctx) {
const url = new URL(request.url);
if (url.pathname === "/api/health") {
return Response.json({ ok: true, app_id: ctx.app.app_id });
}
return new Response("not found", { status: 404 });
}
};