https://github.com/simonv3/khns-text
Send texts to the KHNS studio
https://github.com/simonv3/khns-text
messaging radio skagway twilio
Last synced: 18 days ago
JSON representation
Send texts to the KHNS studio
- Host: GitHub
- URL: https://github.com/simonv3/khns-text
- Owner: simonv3
- Created: 2017-06-17T20:05:11.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-17T20:36:33.000Z (about 9 years ago)
- Last Synced: 2025-11-11T12:34:19.727Z (8 months ago)
- Topics: messaging, radio, skagway, twilio
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A simple Express app that lets you see texts to a Twilio number
# Production
This is set up to run on Heroku. Deploying is as simple as pushing the master branch to a Heroku app.
## Environment Variables
You'll need a `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, and `TWILIO_PHONE_NUMBER`.
# Development
```
forever -w server.js
```
The app will now be available at localhost:3000 and will update as you make changes to it. Note that you'll need the necessary Twilio environment variables for it to work.
## Environment Variables
You'll need a `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, and `TWILIO_PHONE_NUMBER`. It's recommended that you put these in the `.env` file. You can do this by copying the .env.example file to .env:
```
cp .env.example .env
```
and then filling in the necessary details.
## webhooks
Twilio uses webhooks to reply to messages.
For development purposes you can use [ngrok](https://ngrok.com/download) to make these webhooks available on the public internet.
In where-ever you've downloaded ngrok (probably ~/Downloads on a Mac), run:
```
./ngrok http 3000
```
This will assign you a random URL that you can then point your Twilio instance at.
Note that every time you restart the subdomain of this URL will be different.
One way of avoiding this is to pay for ngrok.