Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

TwilioDevEd/automated-survey-servlets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated Survey Servlets

Java Servlet CI

An application example implementing Click to Call using Twilio. An application example that implements an Automated Survey using Twilio.

Run the application

  1. Clone the repository and cd into it.

     git clone git@github.com:TwilioDevEd/automated-survey-servlets.git
     cd automated-survey-servlets
  2. The application uses Gradle to manage dependencies.

  3. Set your environment variables

    cp .env.example .env

    No variables needed in this project

  4. Configure Twilio to call your webhooks.

    You will need to configure Twilio to call your application when SMSs and calls are received.

    You will need to provision at least one Twilio number with SMS and voice capabilities so the application's users can trigger the survey. You can buy a number right here. Once you have a number you need to configure it to work with your application. Open the number management page and open a number's configuration by clicking on it.

    Configure Voice

  5. Run the application using Gradle Gretty plugin.

    ./gradlew appRun

    This will run the embedded Jetty application server that uses port 8080.

  6. Expose the application to the wider Internet using ngrok.

    ngrok http 8080

    Once you have started ngrok, update your Twilio's number SMS and voice URL setting to use your ngrok hostname. It will look something like this:

    http://<your-ngrok-subdomaon/survey
    

Dependencies

This application uses this Twilio helper library.

Run the tests

Run at the top-level directory.

./gradlew test

Meta

  • No warranty expressed or implied. Software is as is. Diggity.
  • MIT License
  • Lovingly crafted by Twilio Developer Education.