0.0.1 • Published 7 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-wechatUsage
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
baseUrlis the base url of route path.appIdis the wechat AppID (see doc).secretis the wechat AppSecret (see doc).hostsis the hosts whitelistjsApiListis the js api list
License
0.0.1
7 years ago