Spring Twitter Stream

Spring Boot - Spring Social Twitter - D3.Js webapp for Streaming Live #HashTags and source location of Tweets.

Demo

Live Demo @ Heroku PaaS.

Installation

Clone the Github repository

$ git clone https://github.com/RawSanj/Spring-Twitter-Stream.git

Twitter App and Configuration

  1. Login to https://apps.twitter.com
  2. Create a New Application and note down the Consumer Key, Consumer Secret, Access Token and Access Token Secret.
  3. Edit the /src/main/resources/application.properties and add above noted keys.

Run the application

$ mvn spring-boot:run

Then navigate to http://localhost:8080 in your browser.

Deploy to Cloud Foundry

Package the application (creates spring-twitter-stream-0.1.0.war file)

$ mvn clean package

Pre-requisite:

  1. Account @ http://run.pivotal.io. $87 Credit Free Account.
  2. cf cli is installed - http://docs.cloudfoundry.org/cf-cli

Login to Pivotal Cloud Foundry

$ cf login -a https://api.run.pivotal.io

Deploy the application

$ cf push spring-twitter-app -p target/spring-twitter-stream-0.1.0.war --random-route

Deploy to Heroku

Package the application (creates spring-twitter-stream-0.1.0.war file)

$ mvn clean package

Pre-requisite:

  1. Account @ https://www.heroku.com. Free Account.
  2. heroku cli is installed - https://devcenter.heroku.com/articles/heroku-cli

Login to Heroku

$ heroku login

Install Heroku cli deploy plugin

$ heroku plugins:install heroku-cli-deploy

Create the application in Heroku

$ heroku create spring-tweets-app

Deploy the application

$ heroku war:deploy target/spring-twitter-stream-0.1.0.war --app spring-tweets-app
Avatar
Sanjay Rawat
Cloud Developer

I’m interested in all Cloud Tech - AWS, Serverless, Docker, Kubernetes. Mostly write Java, Spring, Kotlin and Node.js code.