cloudfoundry-samples/sinatra-cf-twitter

Name: sinatra-cf-twitter

Owner: Cloud Foundry Sample Applications

Description: A Sinatra and Redis app - does one Twitter user follow another?

Created: 2012-04-20 13:22:17.0

Updated: 2016-10-21 22:15:46.0

Pushed: 2014-08-26 17:28:21.0

Homepage: http://whofollows.cloudfoundry.com

Size: 260

Language: Ruby

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Who Follows?

============

A simple Sinatra/Redis app - does one Twitter user follow another?

This is a refactored and improved version of the app built for RailsConf 2011 by Charles Lee.

There is an example deployed at http://twhofollows.cfapps.io

Overview

This example uses:

It demonstrates:

Deployment to Cloud Foundry

First, fork the project. Then run:

git clone git@github.com:<your_name>/sinatra-cf-twitter.git whofollows
cd whofollows
cp manifest.yml.example manifest.yml
vi manifest.yml

Edit the application name in the manifest file to be a unique value (an appname must be a unique name across all applications running on a Cloud Foundry instance); enter a Redis service instance name; enter your Twitter app API keys; then save the file.

bundle install
cf create-service rediscloud 25mb <service-name>
cf push

Visit http://appname.cfapps.io and run some queries.

To see the use of multiple instances, refresh the page (the initial manifest specifies 2 instances). The port displayed at the end of the page will vary.

To modify, run cf scale -i n (where n is the number of instances of the app to create), and then reload the page. Repeat with a lower value of n to reduce the number.

To clear the database cache, hit the /cleardb endpoint.

Issues

The following issues are known:

Future enhancements

A few areas could be tided up:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.