# kosa8 sandbox preview

Make a signed, expiring link to a web server in a sandbox

## Usage

```
kosa8 sandbox preview SANDBOX PORT
```

Prints a link that opens PORT of a server running in the sandbox in a browser.
The link carries a token signed by the daemon and stops working when it
expires, when the sandbox is deleted, or when every link is revoked with
`kosa8 sandbox preview --revoke-all`. The server must listen on 0.0.0.0.

  kosa8 sandbox preview web 8000 --session main --expires 30m

## Flags

| Flag | Type | What it does | Default |
|---|---|---|---|
| `--container` | string | the container the server runs in |  |
| `--expires` | duration | how long the link works (at most 168h) | `1h0m0s` |
| `--revoke-all` | bool | end every preview link this daemon has made |  |
| `--session` | string | the shell session the server runs in |  |

## Example

```
  kosa8 sandbox preview dev 3000
  kosa8 sandbox preview dev 8080 --expires 1h
  kosa8 sandbox preview --revoke-all     # every link stops working
```

---
Source: https://docs.kosa8.com/reference/sandbox-preview/
