GithubHelp home page GithubHelp logo

tmartin14 / twitter-rabbit-socks-sample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jencompgeek/twitter-rabbit-socks-sample

0.0 2.0 0.0 485 KB

JavaScript 22.22% HTML 1.37% Java 31.86% CSS 44.55%

twitter-rabbit-socks-sample's Introduction

Cloud Foundry Twitter Search

This is a distributed application containing 2 components:

  • twitter2rabbit: A standalone Spring Integration application that periodically polls twitter for tweets containing the word "cloud" and places them in a Rabbit queue.
  • rabbit2socks: A node.js application that consumes tweets from the Rabbit queue and pushes them to the browser using Sock.js

Usage

rabbit2socks

Prior to deploying the app, update the file public/index.html to the URL you plan to provide for the application:

var sock = new SockJS("http://mytwittersearch.cloudfoundry.com/socks");

Package the application dependencies by running 'npm install'. To deploy the application to Cloud Foundry, simply use the provided manifest.yml file. You need only to provide the application with a name and URL (make sure you use the URL you specified in public/index.html):

cd rabbit2socks
npm install
vmc push
Would you like to deploy from the current directory? [Yn]:
Application Name: mytwittersearch
Application Deployed URL [mytwittersearch.cloudfoundry.com]:

Open a browser and navigate to http://mytwittersearch.cloudfoundry.com. The page will be blank initially, but watch for dynamically added tweets once you've deployed twitter2rabbit.

twitter2rabbit

Simply use the provided manifest.yml file to deploy the application to Cloud Foundry. You need only to provide the application with a name.

cd twitter2rabbit
mvn package
vmc push
Would you like to deploy from the current directory? [Yn]:
Application Name: twitter2rabbit

Now just keep an eye on http://mytwittersearch.cloudfoundry.com and watch those new tweets pop up every 5 seconds!

Using Gradle

If you would prefer to use Gradle to build twitter2rabbit, simply run "gradle installApp". Then update the path and command in the manifest.yml file:

applications:
  build/install/twitter2rabbit:
...
command: bin/twitter2rabbit

twitter-rabbit-socks-sample's People

Contributors

ghillert avatar markfisher avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.