Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed May 1, 2024
1 parent 9165cf3 commit 876a11c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,15 @@ Sometimes, it's convenient to run Trap on the same ports that [Buggregator](http
uses by default. Well, that's also possible:

```bash
vendor/bin/trap -p1025 -p9912 -p9913 -p8000
vendor/bin/trap -p1025 -p9912 -p9913 -p8000 --ui=8080
```

Environment variables can also be used to set endpoints:
- `TRAP_TCP_PORTS` - for TCP traffic: `9912,9913,1025,8000`
- `TRAP_TCP_HOST` - for the TCP host (default: `127.0.0.1`)
- `TRAP_UI_PORT` - for the web interface: `8080`


### Choosing Your Senders

Buggregator Trap provides a variety of "senders" that dictate where the dumps will be sent. Currently, the available
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Server/Frontend.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
final class Frontend
{
/** @var int<1, 65535> */
#[Env('TRAP_FRONTEND_PORT')]
#[Env('TRAP_UI_PORT')]
#[InputOption('ui')]
#[XPath('/trap/frontend/@port')]
public int $port = 8000;
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Server/TcpPorts.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class TcpPorts
*/
#[Env('TRAP_TCP_PORTS')]
#[InputOption('port')]
public array $ports = [9912, 9913];
public array $ports = [9912];

/**
* Host to listen
Expand Down
2 changes: 1 addition & 1 deletion src/Service/Config/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* @internal
*/
#[\Attribute(\Attribute::TARGET_PROPERTY)]
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::IS_REPEATABLE)]
final class Env implements ConfigAttribute
{
public function __construct(
Expand Down

0 comments on commit 876a11c

Please sign in to comment.