How it Works
Define your web server startup commands just like Setup Commands. Instead of taking a snapshot, Codegen keeps the server running as a long-lived process. A “View Web Preview” button appears on the agent trace page once the server starts. Click it to open your running application in a new tab through Codegen’s secure proxy.
Access the Web Preview from the agent trace page
Configuration
You configure Web Preview commands in a manner similar to Setup Commands, likely within the same repository settings area (e.g.,https://codegen.com/{your_org}/{repo_name}/settings/web-preview).
You’ll provide the command(s) necessary to start your development server. Ensure that your server is configured to listen on an appropriate host (often 0.0.0.0) and a predictable port that Codegen can then expose.
Common Examples
The primary use case is starting a development web server:The web preview is intended for development and debugging purposes. The server
is typically only accessible while the agent run is active or for a short
period afterward, and it’s not designed for public hosting.