An example application implementing an automated phone line using Node.js and Express web framework.
First you need to install either Node.js or io.js, both of which should also install npm.
-
To run the app locally, clone this repository and
cd
into it. -
Install project's dependencies.
npm install
-
Start the development server.
node .
Alternatively you might also consider using nodemon for this. It works just like the node command, but automatically restarts your application when you change any source code files.
npm install -g nodemon nodemon .
-
Expose the application to the wider Internet using ngrok.
ngrok http 3000 -host-header="localhost:3000"
-
Provision a number under the Twilio's Manage Numbers page on your account. Set the voice URL for the number to http://[your-ngrok-subdomain].ngrok.io/ivr/welcome
That's it!
You can run the tests locally by typing
npm test
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.