Deploy
You can deploy your frac App as a Node.js server on any compatible infrastructure provider, or to Cloudflare Workers via the nodejs_compat runtime.
Below are two common deployment targets. frac does not require a specific hosting provider; any platform that can run the server and expose /mcp over HTTPS can host your app.
Cloudflare Workers
Section titled “Cloudflare Workers”frac runs on Cloudflare Workers via Wrangler and the nodejs_compat runtime. Static assets (your built views) are served by Cloudflare’s edge directly; the worker handles /mcp traffic and any other dynamic routes.
Configure
Section titled “Configure”Add a wrangler.jsonc at your project root:
{ "name": "your-frac-app", "main": "dist/server.js", "compatibility_date": "2025-09-01", "compatibility_flags": ["nodejs_compat"], "assets": { "directory": "dist/assets" }, "define": { "process.env.NODE_ENV": "\"production\"" }}Each setting is load-bearing:
compatibility_date >= 2025-09-01+nodejs_compat— enablescloudflare:node’shttpServerHandler, which frac uses to bridge the Express app to the Workers fetch event.assets.directory— points at the views built byfrac build. Cloudflare serves these at the edge before requests reach your worker.define.process.env.NODE_ENV— forces production mode even underwrangler dev. Without it, wrangler defaults todevelopmentlocally and frac’s development tooling can be pulled into the worker bundle.
Build and deploy
Section titled “Build and deploy”npm run buildnpx wrangler deploypnpm buildpnpm dlx wrangler deployyarn buildyarn dlx wrangler deploybun run buildbunx wrangler deployTest locally
Section titled “Test locally”wrangler dev runs your worker in workerd on your machine — the same runtime as production, not a Node.js fallback:
npm run buildnpx wrangler devpnpm buildpnpm dlx wrangler devyarn buildyarn dlx wrangler devbun run buildbunx wrangler devDocker
Section titled “Docker”Projects created with the frac scaffolder include a multi-stage Dockerfile so you can self-host on any container platform:
npm installdocker build -t my-app .docker run -p 3000:3000 my-apppnpm installdocker build -t my-app .docker run -p 3000:3000 my-appyarn installdocker build -t my-app .docker run -p 3000:3000 my-app