A Rails API with an end point to capture a search term request and then count the frequency of the search term within a 15 minute block of time. A second endpoint, utilizing SNS/SQS, is also provided as a more scalable solution.
$ gem install bundler
$ bundle check || bundle install
Create database and run migrations
$ rake db:setup
$ COVERAGE=true rspec
$ open coverage/index.html
METHOD 1
curl 'http://localhost:3000/api/v1/search' \
-X POST \
-d 'q=beer'
METHOD 2
curl 'http://localhost:3000/api/v2/search' \
-X POST \
-d 'q=beer'