Skip to content

Commit f715070

Browse files
committed
docs(twilio-run): adds docs for ngrok config options
1 parent 1bb9f9d commit f715070

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/twilio-run/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,28 @@ twilio-run --ngrok
156156
twilio-run --ngrok --ngrok-config=./ngrok.yml --ngrok-name=example
157157
```
158158

159+
#### ngrok
160+
161+
`twilio-run` lets you open a tunnel using [ngrok](https://ngrok.com/) (see the examples above). By default, just setting the `--ngrok` flag will use a randomly generated subdomain. If you have a paid for ngrok account, you can customise this experience.
162+
163+
##### Custom ngrok subdomain
164+
165+
Run the following command:
166+
167+
```
168+
twilio-run --ngrok=subdomain
169+
```
170+
171+
This will start the `twilio-run` server and also tunnel to it over ngrok via the domain `subdomain.ngrok.io`.
172+
173+
##### Custom ngrok config
174+
175+
You can create an [ngrok config file](https://ngrok.com/docs#config-location) which allows you to name tunnels and include other settings for those named tunnels, such as the subdomain, auth, or host headers.
176+
177+
You can choose to run a named tunnel with `twilio-run` by passing the `--ngrok-name` flag. This will find the named tunnel in your default config, over-ride the `proto` to http and the `addr` to the port your Twilio Functions are running on, otherwise keeping the rest of the settings.
178+
179+
You can also choose to use a different config file by setting the `--ngrok-config` flag.
180+
159181
### `twilio-run deploy`
160182

161183
Deploys your project to Twilio. It will read dependencies automatically from your `package.json`'s `dependencies` field and install them. It will also upload and set the variables that are specified in your `.env` file. You can point it against a different `.env` file via command-line flags.

0 commit comments

Comments
 (0)