tree: c2b3d48b6145083cff8888ab27b66f8a2bed466f [path history] [tgz]
  1. app/
  2. docs/
  3. package/
  4. routes/
  5. servertest/
  6. test/
  7. .bowerrc
  8. .editorconfig
  9. .gitattributes
  10. .gitignore
  11. .jshintrc
  12. .travis.yml
  13. app.js
  14. bower.json
  15. config.js
  16. dev_start.sh
  17. dist_start.sh
  18. Gruntfile.js
  19. karma-e2e.conf.js
  20. karma.conf.js
  21. package.json
  22. README.md
web/demos/README.md

Web Demos

Web Application for DataTorrent Demos:

  • Twitter URLs
  • Twitter Hashtags
  • Mobile
  • Machine Generated Data
  • Ads Dimensions
  • Fraud

Architecture

Demos Architecture

Running Demos

Demos run on Node.js. See package to run demos with prefetched runtime dependencies (only Node.js is required).

Running Demos in Development Mode

Install npm dependencies:

   $ npm install

Install Bower dependencies:

   $ bower install

Start Node.js server:

   $ node app.js

Application will be available at http://localhost:3003

Demos configuration

Please use config.js or environment variables for configuration (DT Gateway, Redis, MongoDB, etc.). See dist_start.sh and dev_start.sh.

Applications are automatically discovered by name (to show stats like “Events/sec”). See the following settings in config.js:

  • settings.twitterUrls.appName
  • settings.twitterHashtags.appName
  • settings.mobile.appName
  • settings.machine.appName
  • settings.dimensions.appName
  • settings.fraud.appName

Tips

Running Node.js as a daemon with forever

   $ npm install forever -g
   $ forever start app.js
   $ forever list
   $ forever stop <uid>

Running Node.js on different port

   $ PORT=3001 node app.js

Links

Express Node.js web framework

node_redis Node.js Redis client

forever Node.js daemon/continuous running/fault tolerance