1.0.6 • Published 9 years ago

realtime-analytics v1.0.6

Weekly downloads
2
License
ISC
Repository
-
Last release
9 years ago

It Uses a Node server in order to expose through Express specific apis for real-time inbound data tracking, storage (Rethinkdb) and visualization [dashboard: [Angularjs, Socket-io, Jade]

getting started

First of all it's necessary to install Rethinkdb (via Homebrew package manager):

brew install rethinkdb

And set it on system startup;

Then Install and include in your node project the realtime-analytics module Example).

install

With npm do:

npm install realtime-analytics

example

var ra = require('realtime-analytics');

ra.initServer('3000');
ra.initDashboard('/',['cars','toys']);

ra.listen('/cars','cars', function (data) {
  ra.dbInsert('stuffdb','cars',data);
});

ra.listen('/toys','toys', function (data) {
  ra.dbInsert('stuffdb','toys',data);
});

Then execute you node app: node /path/to/app/appname.js, and visit http://localhost:port

In order to populate the Db and accordingly the Dashboard, it's necessary to make an HTTP:POST request against the webpaths defined with the listen(webpath, ...)

usage

Standard APIs:

.initServer(port) - init the server port.

.initDashboard(path, tables_array) - init dashboard webpath and db.tables to be analyzed.

.listen(webpath, category_name)data - exposes a webpath which listen for HTTP:POST and return the data.

.dbInsert(db_name, table_name, data_from_listen) - takes data from listeners and store it in the DB.

include

var ra = require('realtime-analytics')

changelog

Releases are documented in changelog.markdown.

license

MIT - malgaboy

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago