Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,8 @@ This eliminates the need for polling—perfect for long-running processes like b
| Variable | Default | Description |
| ---------------------- | ---------- | -------------------------------------------------- |
| `PTY_MAX_BUFFER_LINES` | `50000` | Maximum lines to keep in output buffer per session |
| `PTY_WEB_HOSTNAME` | `::1` | Hostname for the web server to bind to |
| `PTY_WEB_HOSTNAME` | `127.0.0.1`| Hostname for the web server to bind to (IPv4) |
| `PTY_WEB_PORT` | `0` (random) | Port for the web server (0 = random port) |

### Permissions

Expand Down
4 changes: 2 additions & 2 deletions src/web/server/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export class PTYServer implements Disposable {

private startWebServer(): Server<undefined> {
return Bun.serve({
port: 0,
hostname: process.env.PTY_WEB_HOSTNAME ?? '::1',
port: process.env.PTY_WEB_PORT ? parseInt(process.env.PTY_WEB_PORT, 10) : 0,
hostname: process.env.PTY_WEB_HOSTNAME ?? '127.0.0.1',

routes: {
...this.staticRoutes,
Expand Down