Skip to content

sankyutang/egg-leancloud

Repository files navigation

egg-leadcloud

LeanCloud JavaScript SDK for egg framework

Install

$ npm install egg-leancloud --save

Configuration

Change ${app_root}/config/plugin.js to enable leadcloud plugin:

exports.AV = {
  enable: true,
  package: 'egg-leancloud',
};

Configure LeadCloud information in ${app_root}/config/config.default.js:

exports.AV = {
  // leanCloud configuration
  client: {
    appId: 'your leanCloud appId',
    appKey: 'your leanCloud appKey',
  },
  // load into app, default is open
  app: true,
  // load into agent, default is close
  agent: false,
};

Usage:

app.AV // you can access to simple leanCloud instance by using app.AV

CURD User Guide

query example

const query = new app.AV.Query('TestObject');
const list = yield query.find();

About

LeanCloud JavaScript SDK for egg framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published