Use Twilio to create sms notifications to keep your subscribers in the loop.
Hit the button!
git clone firstname.lastname@example.org:TwilioDevEd/marketing-notifications-sinatra.git cd marketing-notifications-sinatra
Make sure you have installed PostgreSQL. If on a Mac, I recommend Postgres.app. Given that, we'll use a rake task to generate the database used by the app. You just need to provide a valid user with permission to create databases.
bundle exec rake db:create db:migrate
You can find
AccountSID and the
AuthToken at https://www.twilio.com/user/account/settings.
export TWILIO_ACCOUNT_SID=your account sid export TWILIO_AUTH_TOKEN=your auth token export TWILIO_NUMBER=your twilio number
bundle exec rake spec
In order to receive subscribers you will need to point a Twilio number to the app running. To do that we can use ngrok to expose the application to the wilder internet.
ngrok http 3000
Go to your dashboard on Twilio. Click on Twilio Numbers and choose a number to setup. On the phone number page, enter the address provided by ngrok into the Messaging Request URL field.
By now, your application should be up and running at http://localhost:3000/. Now your subscribers will be able to text your new Twilio number to Subscribe to your Marketing Notifications line.
This application uses this Twilio helper library:
Please visit these libraries and pay your respects.