Deployment
Node
Build a runnable Node HTTP server artifact.
The Node target compiles the workspace into a Node-runnable HTTP server. It's the simplest deploy target and the easiest to wrap in Docker, Foundry, or any container platform.
Build
fh build --target nodeOutput:
.fabricharness/build/node/
dist/server.mjs
manifest.json
README.node.mdRun
node .fabricharness/build/node/dist/server.mjsRoutes
GET /healthGET /manifestPOST /agents/:agent/:id
Configuration via env
| Variable | Purpose |
|---|---|
PORT | Listen port (default 3030). |
HOST | Listen address (default 127.0.0.1). |
FABRIC_AUTH_TOKEN_ENV | Name of the env var holding the bearer token. |
FABRIC_MAX_BODY_BYTES | Reject larger bodies. |
FABRIC_RATE_LIMIT_WINDOW_MS / FABRIC_RATE_LIMIT_MAX | Per-IP rate limit. |
The same flags are available on fh dev.
Using the manifest at runtime
curl http://localhost:3030/manifestThe manifest mirrors manifest.json and lists agents, schemas, declared models, and triggers. Tooling and gateways can use it for routing decisions.
Wrap in a container
FROM node:22-slim
WORKDIR /app
COPY .fabricharness/build/node/dist/ ./dist/
COPY .fabricharness/build/node/manifest.json ./
ENV PORT=8080
EXPOSE 8080
CMD ["node", "dist/server.mjs"]For a one-step container build, prefer --target docker — see Docker.