WeBot - 微信公众平台提供的开放信息接口的自动回复系统,基于node.js 实现。node
本地运行
- git clone https://github.com/ktmud/weixin-robot
- cd ./weixin-robot/example
- npm install -d
- set DEBUG=weixin.* (设置环境变量方可查看调试信息)
- node app.js
消息调试
- cd ./weixin-robot/bin
- node webot
- node webot --help 查看支持的参数
- node webot 发送文字
- node webot -i 发送图片
- node webot -l 发送地理位置
本地测试
- npm install mocha -g
- cd ./weixin-robot/example
- mocha
部署到cloudfoundry
- cd ./weixin-robot/example (仅需发布example目录,而不须要整个weixin-robot)
- npm install -d (不少错误就是由于没安装依赖模块)
- 修改manifest.yml (可选)
- vmc push
- vmc logs 能够看执行日志