@leapit/analysis
Analysis for mBaaS
Last updated 4 years ago by leapit .
Original npm · Tarball · package.json
$ cnpm install @leapit/analysis 
SYNC missed versions from official npm registry.

Analysis

Usage

npm install @leapit/analysis

Config your analysis like this

Example

var opts = {
    persistence: {
        url: 'mongodb://localhost:27017/analysis',
        mongo: {},
        reports: 'reports',
        logs:'logs'
    },
    ipdata : {
        city: './ipdata/GeoLite2-City.mmdb'
    }
};

Set your analysis middleware,Take express for example


var analysis = require('@leapit/analysis');
app.use(analysis(opts));

Usage(in routes),Take express for example

/* GET home page. */
router.get('/', function(req, res, next) {

  req.record('index',{"custorm":"here"});
  
  res.render('index', { title: 'Express' });
});

Current Tags

  • 0.1.0                                ...           0.1.00 (4 years ago)
  • 0.1.1                                ...           latest (4 years ago)

2 Versions

  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 3
Last Month 3
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |