FabricFabricHarness
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 node

Output:

.fabricharness/build/node/
  dist/server.mjs
  manifest.json
  README.node.md

Run

node .fabricharness/build/node/dist/server.mjs

Routes

  • GET /health
  • GET /manifest
  • POST /agents/:agent/:id

Configuration via env

VariablePurpose
PORTListen port (default 3030).
HOSTListen address (default 127.0.0.1).
FABRIC_AUTH_TOKEN_ENVName of the env var holding the bearer token.
FABRIC_MAX_BODY_BYTESReject larger bodies.
FABRIC_RATE_LIMIT_WINDOW_MS / FABRIC_RATE_LIMIT_MAXPer-IP rate limit.

The same flags are available on fh dev.

Using the manifest at runtime

curl http://localhost:3030/manifest

The 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.