leancloud-log-middleware
Middleware of creating Leancloud object, by configuring LOG_SYSTEM_APP_ID, LOG_SYSTEM_APP_KEY and LOG_SYSTEM_CLASS
Install
$ npm install --save leancloud-log-middleware
Initializing
This package will initialize leancloud (AV.init) in npm module.
(Or using AV func before AV.init will cause leancloud error.)
export LOG_SYSTEM_APP_ID=YOUR_LEANCLOUD_API_IP
export LOG_SYSTEM_APP_KEY=YOUR_LEANCLOUD_API_KEY
export LOG_SYSTEM_CLASS=YOUR_LEANCLOUD_CLASS
export isUS=true
$ npm start
Usage
upload
var express = require('express');
var app = express();
var logModule = require('leancloud-log-middleware');
app.use(logModule.Request);
app.use(logModule.Response)
...
app.use('/', routes);
app.use('/v1/users', users);