Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

leancloud-log-middleware

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

leancloud-log-middleware

Middleware of creating Leancloud object, by configuring LOG_SYSTEM_APP_ID, LOG_SYSTEM_APP_KEY and LOG_SYSTEM_CLASS

  • 1.5.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

leancloud-log-middleware

Middleware of creating Leancloud object, by configuring LOG_SYSTEM_APP_ID, LOG_SYSTEM_APP_KEY and LOG_SYSTEM_CLASS

NPM

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.)


// Before runing express server
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 SESSION_NAME = process.env.SESSION_NAME (if session token is defined by yourself)
export isUS=true

$ npm start

Usage

upload

var express = require('express');
var app = express();
var logModule = require('leancloud-log-middleware');

// bodyParser needed to include if req.body is needed ...
// app.use(bodyParser.json());
// app.use(bodyParser.urlencoded({ extended: false }));

app.use(logModule.Request);
app.use(logModule.Response)

...

app.use('/', routes);
app.use('/v1/users', users);

Keywords

FAQs

Package last updated on 24 Feb 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc