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 能夠看執行日誌