Skip to content

Commit

Permalink
docs(qsrs): replace README boilerplate with actual content
Browse files Browse the repository at this point in the history
  • Loading branch information
stern-shawn committed Feb 7, 2023
1 parent a017983 commit 0d9ee80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 48 deletions.
3 changes: 2 additions & 1 deletion quickstart-serverless-receive-sms/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## [Unreleased]

## [1.0.0]

### Added
- Initial release.

- Initial release.
50 changes: 3 additions & 47 deletions quickstart-serverless-receive-sms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,53 +12,9 @@ In your `.env` file, set the following values:

| Variable | Description | Required |
| :------- | :---------- | :------- |

| TWILIO_PHONE_NUMBER | A Twilio phone number |
| MY_PHONE_NUMBER | The phone number to forward test messages to | Yes |

### Function Parameters

`/blank` expects the following parameters:

| Parameter | Description | Required |
| :-------- | :---------- | :------- |


`/hello-messaging` is protected and requires a valid Twilio signature as well as the following parameters:

| Parameter | Description | Required |
| :-------- | :---------- | :------- |


## Create a new project with the template

1. Install the [Twilio CLI](https://www.twilio.com/docs/twilio-cli/quickstart#install-twilio-cli)
2. Install the [serverless toolkit](https://www.twilio.com/docs/labs/serverless-toolkit/getting-started)

```shell
twilio plugins:install @twilio-labs/plugin-serverless
```

3. Initiate a new project

```
twilio serverless:init example --template=quickstart-serverless-receive-sms && cd example
```

4. Start the server with the [Twilio CLI](https://www.twilio.com/docs/twilio-cli/quickstart):

```
twilio serverless:start
```

5. Open the web page at https://localhost:3000/index.html and enter your phone number to test

ℹ️ Check the developer console and terminal for any errors, make sure you've set your environment variables.

## Deploying

Deploy your functions and assets with either of the following commands. Note: you must run these commands from inside your project folder. [More details in the docs.](https://www.twilio.com/docs/labs/serverless-toolkit)

With the [Twilio CLI](https://www.twilio.com/docs/twilio-cli/quickstart):

```
twilio serverless:deploy
```
Each Function expects the incoming request to be a messaging webhook. The specifics vary between each example, but at most, the parameters that will be used are `From` and `Body`.

0 comments on commit 0d9ee80

Please sign in to comment.