0.0.1 • Published 6 years ago
y-server-plugin-wechat v0.0.1
y-server-plugin-wechat
y-server-plugin-wechat is a y-server wechat plugin.
Install
npm install y-server-plugin-wechat
Usage
const yServer = require('y-server');
const wechatPlugin = require('y-server-plugin-wechat');
yServer({
plugins: [
wechatPlugin({
baseUrl: '/githubx',
appId: 'wx9cf1eb96d1d90407',
secret: '091ede1d21be2e7f86bc678408a49a8d',
hosts: [
'*.githubx.com',
],
jsApiList: [
'onMenuShareAppMessage',
'onMenuShareTimeline',
'onMenuShareQQ',
'onMenuShareQZone',
'onMenuShareWeibo',
],
}),
],
});
Notes
baseUrl
is the base url of route path.appId
is the wechat AppID (see doc).secret
is the wechat AppSecret (see doc).hosts
is the hosts whitelistjsApiList
is the js api list
License
0.0.1
6 years ago