Skip to content

Commit

Permalink
docs(twilio-run): adds docs for ngrok config options
Browse files Browse the repository at this point in the history
  • Loading branch information
philnash committed Apr 16, 2021
1 parent 1bb9f9d commit f715070
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/twilio-run/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,28 @@ twilio-run --ngrok
twilio-run --ngrok --ngrok-config=./ngrok.yml --ngrok-name=example
```

#### ngrok

`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.

##### Custom ngrok subdomain

Run the following command:

```
twilio-run --ngrok=subdomain
```

This will start the `twilio-run` server and also tunnel to it over ngrok via the domain `subdomain.ngrok.io`.

##### Custom ngrok config

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.

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.

You can also choose to use a different config file by setting the `--ngrok-config` flag.

### `twilio-run deploy`

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.
Expand Down

0 comments on commit f715070

Please sign in to comment.