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

egg-wechat-api-sql

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-wechat-api-sql

wechat-api-sql for egg

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

egg-wechat-api

NPM version build status Test coverage David deps Known Vulnerabilities npm download

egg plugin for wechat-api

Install

$ npm i egg-wechat-api --save

Prerequisite

Node.js >= 7.x

Usage

Dependencies

Configuration

// {app_root}/config/plugin.js
exports.wechatApi = {
  enable: true,
  package: 'egg-wechat-api',
};
// {app_root}/config/config.default.js
exports.wechatApi = {  
  appId: '',
  appSecret: '',
};

Redis is required !

see config/config.default.js for more detail.

Example

'use strict';

module.exports = app => {

  app.get('/', function* () {

    const { wechatApi } = app;

    try {
      const ticket = yield wechatApi.getTicket();
      this.status = 200;
      this.body = ticket;

    } catch (error) {
      this.status = 500;
      this.body = error;
    }
  });

};

Questions & Suggestions

Please open an issue here.

License

MIT

Keywords

FAQs

Package last updated on 20 Jan 2018

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