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.
Build for Production
Section titled “Build for Production”Before deploying, you need to build your application. Run the build command from your project root:
npm run buildpnpm buildyarn buildbun builddeno task buildThis runs the frac build command, which compiles your views and server code for production.
Start Production Server
Section titled “Start Production Server”Once your app is built, start the production server:
npm startpnpm startyarn startbun startdeno task startThis runs the frac start command, which starts your production server.
How it works
Section titled “How it works”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 duringfrac build) - MCP endpoint - Exposes your MCP server at
/mcpfor 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.