twiliochat with Servlets
Java implementation of Twilio Chat
Run the application
Clone the repository and
Copy the sample configuration file and edit it to match your configuration.
$ cp .env.example .env
You can find your
TWILIO_ACCOUNT_SID in your
Twilio Account Settings.
TWILIO_API_SECRET you need to go
youl'll be able to create a new API key obtaining the two required values,
TWILIO_CHAT_SERVICE_SID you can go here,
where you must create a Programmable Chat Messaging Service. When the service is created you'll
have access to the service's SID.
Load the configuration file:
$ source .env
Run the application using gretty gradle plugin.
$ ./gradlew appRun
Now you can access the application at
Expose your localhost to the internet
If you want your chat application to be reachable publicly in the internet, you can use a service like ngrok.
Expose the application to the wider Internet
$ ngrok http 8080
This application uses this Twilio helper library:
- twilio-java helper library
- Java Servlet API
- Gradle Gretty plugin
- Guice Dependency Injection Framework
Run the tests
Run at the top-level directory:
$ ./gradlew test
$ cd src/main/webapp/ && npm install && npm test
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.