Simple Sinatra webapp which uses Amazon's Polly API and Mailgun to accept emails with an article url as the subject line, and return an MP3 of that narrated article.
Getting Started
Requirements
- Ruby
- Bundler
- Postgres
- AWS SDK
Setup
bundle install
rake db:setup
- Create the following environment variables (MAILGUN_API_KEY, S3_KEY, S3_SECRET, S3_BUCKET_NAME)
- Make sure to setup your AWS SDK. The bundle install command should have installed it for you, so just make sure to edit
~/.aws/credentials
and include your AWS access key and secret key. - Edit config/database.yml:
development:
adapter: postgresql
encoding: unicode
database: ttmdb
pool: 2
username: USERNAME
password: PASSWORD
Run
rackup config.ru