@pb33f/wiretap 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,17 +38,30 @@ headers:
|
|
|
38
38
|
- Origin
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
## Configuring static paths
|
|
42
|
+
|
|
43
|
+
Running a single page application? Need certain paths to always be caught and forwarded to your SPA? Configure
|
|
44
|
+
static paths to be caught and forwarded to your SPA.
|
|
45
|
+
|
|
46
|
+
```yaml
|
|
47
|
+
staticDir: ui/dist
|
|
48
|
+
staticIndex: index.html
|
|
49
|
+
staticPaths:
|
|
50
|
+
- /my-app/*
|
|
51
|
+
- /another-app/somewhere/*
|
|
52
|
+
```
|
|
53
|
+
|
|
41
54
|
## Command Line Interface
|
|
42
55
|
|
|
43
56
|
### Available Flags
|
|
44
57
|
|
|
45
|
-
| Shortcut | Flag
|
|
46
|
-
|
|
47
|
-
| `-u` | `--url`
|
|
48
|
-
| `-s` | `--spec`
|
|
49
|
-
| `-p` | `--port`
|
|
58
|
+
| Shortcut | Flag | Description |
|
|
59
|
+
|----------|------------------|--------------------------------------------------------------------------------------------|
|
|
60
|
+
| `-u` | `--url` | Redirect URL for wiretap to send traffic to. |
|
|
61
|
+
| `-s` | `--spec` | Path to the OpenAPI Specification to use. |
|
|
62
|
+
| `-p` | `--port` | Port on which to listen for API traffic. (default is `9090`) |
|
|
50
63
|
| `-m` | `--monitor-port` | Port on which to serve the monitor UI. (default is `9091`) |
|
|
51
|
-
| `-d` | `--delay`
|
|
52
|
-
| `-c` | `--config`
|
|
53
|
-
| `-t` | `--static`
|
|
54
|
-
|
|
64
|
+
| `-d` | `--delay` | Set a global delay for all API requests in milliseconds. (default is `0`) |
|
|
65
|
+
| `-c` | `--config` | Location of wiretap configuration file to use (default is `.wiretap` in current directory) |
|
|
66
|
+
| `-t` | `--static` | Location of static files to serve along with API requests (simulate real app deployment) |
|
|
67
|
+
| `-i` | `--static-index` | Index file to serve for root static requests and all static paths (default is index.html) |
|
package/package.json
CHANGED