Webot(微信公衆平臺接口)示例項目的若干問題解答

WeBot - 微信公衆平臺提供的開放信息接口的自動回覆系統,基於node.js 實現。node

本地運行

  1. git clone https://github.com/ktmud/weixin-robot
  2. cd ./weixin-robot/example
  3. npm install -d
  4. set DEBUG=weixin.* (設置環境變量方可查看調試信息)
  5. node app.js

消息調試

  1. cd ./weixin-robot/bin
  2. node webot
  • node webot --help 查看支持的參數
  • node webot 發送文字
  • node webot -i 發送圖片
  • node webot -l 發送地理位置

本地測試

  1. npm install mocha -g
  2. cd ./weixin-robot/example
  3. mocha

部署到cloudfoundry

  1. cd ./weixin-robot/example (僅需發佈example目錄,而不須要整個weixin-robot)
  2. npm install -d (不少錯誤就是由於沒安裝依賴模塊)
  3. 修改manifest.yml (可選)
  4. vmc push
  5. vmc logs 能夠看執行日誌
相關文章
相關標籤/搜索