Git Product home page Git Product logo

twitter-streaming-nodejs's Introduction

twitter-streaming-nodejs

Shows how to stream real time twitter data to Google Maps using NodeJS.

A walkthrough of the code is available here. Below deplying the application on AWS Elastic Beanstalk is discussed.

Step 1: Create AWS Account

Since we will be hosting our web application on Amazon Web Services, you first need an account:
  1. Visit http://aws.amazon.com.
  2. Click the Sign Up button at the top.
  3. Complete the registration process.

Step 2: Create an AWS Elastic Beanstalk application

Access Elastic Beanstalk from the console. Choose to create a new application and give it a name and description.

Step 3: Create an Environment

An application can have multiple environments; for example, production, staging, and development. Setup an environment using the parameters below:

create environment

Give the environment a unique name.

environnment information

You are then prompted to choose the source for the application. Choose to upload your own.

upload application

Upload a zip file containing the application. Now this caught me out first time and I think it is really a bug with Beanstalk. You cannot zip the containing folder; you need to zip the files you want within the folder. You only need to zip the items highlighted below. Beanstalk will install its own dependencies using package.json.

Zip File Node

Next, configure the instance you are launching. You don't really need an EC2 key pair unless you plan on logging onto the server. Everything else can be left as default.

configuration details

You will then be taken to the dashboard where you need to wait for it to launch:

launch complete

Once launched, one more step needs to be undertaken. Node.js starts two processes: the web server to handle the static pages, and the web socket server. On Elastic Beanstalk, all of the traffic goes through Nginx, which acts as a proxy server. This prevents the web sockets from functioning correctly. We could go through the trouble of configuring Nginx, but since we are only using web sockets it is easier to turn all proxies off and direct connect.

While on your environment dashboard, click Configuration from the left menu. Then on the Software Configuration tile click the Cog icon. Set the Proxy server drop-down to none and click Save.

configure proxy

You can now access the web page by clicking the link next to the title on the environment dashboard.

twitter-streaming-nodejs's People

Contributors

stewgeo avatar

Watchers

sujit avatar James Cloos 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.