From 4c6d9ed762b51444d319f04104ea073f731090cd Mon Sep 17 00:00:00 2001 From: "codegen-sh[bot]" <131295404+codegen-sh[bot]@users.noreply.github.com> Date: Fri, 25 Jul 2025 17:13:17 +0000 Subject: [PATCH] Update web preview docs to use 127.0.0.1 instead of 0.0.0.0 - Changed host recommendation from 0.0.0.0 to 127.0.0.1 in configuration section - Updated Django example to use 127.0.0.1:3000 - Updated Rails example to use 127.0.0.1 with explicit port 3000 - Maintains port 3000 requirement as specified in warning --- docs/sandboxes/web-preview.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/sandboxes/web-preview.mdx b/docs/sandboxes/web-preview.mdx index 5682ba367..957fb10fa 100644 --- a/docs/sandboxes/web-preview.mdx +++ b/docs/sandboxes/web-preview.mdx @@ -23,7 +23,7 @@ A "View Web Preview" button appears on the agent trace page once the server star 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. +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 `127.0.0.1`) and a predictable port that Codegen can then expose. The web server started for Web Preview **MUST** listen on port 3000. Codegen @@ -42,12 +42,12 @@ npm run dev ```bash # For a Python/Django project -python manage.py runserver 0.0.0.0:8000 +python manage.py runserver 127.0.0.1:3000 ``` ```bash # For a Ruby on Rails project -bundle exec rails server -b 0.0.0.0 +bundle exec rails server -b 127.0.0.1 -p 3000 ```