Skip to content

Commit 18165c8

Browse files
authored
Add example config.json file to README.md
1 parent 4ca1edd commit 18165c8

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,25 @@ separate configuration file. We use `config/toxiproxy.json`. This file can be
290290
passed to the server using the `-config` option, or loaded by the application
291291
to use with the `populate` function.
292292

293+
An example `config/toxiproxy.json`:
294+
295+
```json
296+
[
297+
{
298+
"name": "web_dev_frontend_1",
299+
"listen": "[::]:18080",
300+
"upstream": "webapp.domain:8080",
301+
"enabled": true
302+
},
303+
{
304+
"name": "web_dev_mysql_1",
305+
"listen": "[::]:13306",
306+
"upstream": "database.domain:3306",
307+
"enabled": true
308+
}
309+
]
310+
```
311+
293312
Use ports outside the ephemeral port range to avoid random port conflicts.
294313
It's `32,768` to `61,000` on Linux by default, see
295314
`/proc/sys/net/ipv4/ip_local_port_range`.

0 commit comments

Comments
 (0)