Skip to content

Commit 4c6d9ed

Browse files
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
1 parent 3c14f40 commit 4c6d9ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/sandboxes/web-preview.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ A "View Web Preview" button appears on the agent trace page once the server star
2323

2424
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`).
2525

26-
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.
26+
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.
2727

2828
<Warning>
2929
The web server started for Web Preview **MUST** listen on port 3000. Codegen
@@ -42,12 +42,12 @@ npm run dev
4242

4343
```bash
4444
# For a Python/Django project
45-
python manage.py runserver 0.0.0.0:8000
45+
python manage.py runserver 127.0.0.1:3000
4646
```
4747

4848
```bash
4949
# For a Ruby on Rails project
50-
bundle exec rails server -b 0.0.0.0
50+
bundle exec rails server -b 127.0.0.1 -p 3000
5151
```
5252

5353
<Tip>

0 commit comments

Comments
 (0)