Skip to content

Build for Production

When you’re ready to deploy your App to production, frac provides two commands: frac build to compile your app, and frac start to run it in production mode.

Before deploying, you need to build your application. Run the build command from your project root:

Terminal window
npm run build
Terminal window
pnpm build
Terminal window
yarn build
Terminal window
bun build
Terminal window
deno task build

This runs the frac build command, which compiles your views and server code for production.

Once your app is built, start the production server:

Terminal window
npm start
Terminal window
pnpm start
Terminal window
yarn start
Terminal window
bun start
Terminal window
deno task start

This runs the frac start command, which starts your production server.

The production server runs your compiled application from the dist/ directory with NODE_ENV=production. Unlike the development server, it:

  • Serves pre-built assets - Views and styles are served as static files from /assets (compiled during frac build)
  • MCP endpoint - Exposes your MCP server at /mcp for MCP Clients to connect to
  • No development server - Vite dev server and file watchers are excluded in production for better performance
  • Optimized rendering - Uses production templates that load pre-bundled JavaScript and CSS files

The server listens on port 3000 by default.

When deployed remotely, the MCP Client (ChatGPT, Claude, etc.) connects to your MCP endpoint (e.g., https://your-domain.com/mcp) to access your tools and views.