This is a node port of the click to congress elixir api.
-
$ git clone https://github.com/nypublicradio/click-to-congress
this repository - `$ cd click-to-congress
$ npm install
-
$ cp .env.sample .env
.
Add your twilio credentials to your freshly copied .env
file.
To open up your local server to the incoming Twilio webhook (which actually connects the call), you can use a tool like ngrok to open up a local webserver to the world.
Once you've opened up a local address, update your .env
accordingly:
SCHEME_FOR_TWILIO=http
HOST_FOR_TWILIO=<your ngrok host>
Then just $ node index.js
and you're on your way.
You'll need mocha install globally with $ npm install -g mocha
.
Run the tests with npm test
.