SMS notifications are a great way to alert humans quickly when important events happen. In this example, we'll show you how to send SMS notifications to a list of people when an error happens in a web application.
This project is built using Ruby on Rails Framework.
-
First clone this repository and
cd
into it.$ git clone git://github.com/TwilioDevEd/server-notifications-rails.git $ cd server-notifications-rails
-
Install the dependencies.
$ bundle install
-
Copy the
.env.example
file to.env
, and edit it including your credentials for the Twilio API (found at https://www.twilio.com/console/account/settings). You will also need a Twilio Number. -
Edit the administrators listed in the
config/administrators.yml
. Make sure to use real phone numbers otherwise the application won't work. -
Make sure the tests succeed.
$ bundle exec rails test
-
Start the development server:
$ bundle exec rails s
-
Check it out at http://localhost:3000.
- No warranty expressed or implied. Software is as is. Diggity.
- MIT License
- Lovingly crafted by Twilio Developer Education.