Skip to content

Matt-Dionis/realtime-angular2

Repository files navigation

realtime-angular2

This project (other than the Express server) was generated with angular-cli version 1.0.0.

Installation

  1. Install all dependencies with npm install.

  2. Go to Twitter Apps page and create a dev account and basic app. You will need consumer and access_token keys and secrets.

  3. Replace the placeholders in server.js with your actual keys and secrets. Note: This is not a good long-term solution. You may want to set these as environment variables. Make sure to never commit code containing your actual keys and secrets.

  4. Within the Twitter stream code, track by any hashtag or term you like (default is '#javascript').

Development server

Run npm run serve-build for a dev server. Navigate to http://localhost:3000/. Use Postman or similar tool to send a GET request to http://localhost:3000/stream.

Note: This project was recently updated to Angular v2.3.1, Angular-CLI v1.0.0, and TypeScript v2.0.10. For a clean build run:

npm uninstall -g angular-cli
npm uninstall --save-dev angular-cli
npm install -g @angular/cli@latest
rm -rf node_modules dist
npm install

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive/pipe/service/class.

Further help

To get more help on the angular-cli use ng --help or go check out the Angular-CLI README. To reach out to me personally, contact me on Twitter @mattdionis

About

An Angular CLI project with Express server, Socketio, and Twitter API integration for section 7 of Building Data Visualizations with D3 and Angular

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published