Skip to content

Latest commit

 

History

History
 
 

wechat

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Wechat demo

Installation

You should install dependencies first:

fun

$ npm install @alicloud/fun -g

dependencies

$ npm install

Deploy

Modify the config.js file, replace following config with yourself token, encoding aes key, appid:

exports.config = {
  token: '<YOUR TOKEN>',
  encodingAESkey: '<YOUR ENCODING AES KEY>',
  appid: '<YOUR APP ID>'
};

Deploy it to AliCloud API Gateway & Function Compute:

$ fun deploy
URL: GET http://<api group id>-cn-hangzhou.alicloudapi.com/wechat => cn-shanghai/wechat/get
URL: POST http://<api group id>-cn-hangzhou.alicloudapi.com/wechat => cn-shanghai/wechat/post

Settings

Set the url in Wechat MP admin console.

Demo:

demo

Test

npm run test

License

The MIT License