Code Monkey home page Code Monkey logo

gochat's Introduction

GoChat

A open-source WeChat Official Account server framework based on Beego

VERSION = "1.0"

获取安装

执行以下命令,就能够在你的GOPATH/src 目录下发现gochat

$ go get github.com/gislu/gochat

##初次使用

###配置文件 找到根目录下/conf/id_relative.yaml 这个文件,程序会自动读取配置文件中需要的数据

公共号:请把配置文件的pubid 、pubsecret 、 token一栏后面对应的值换成自己公共号上的AppID/应用ID 、 AppSecret/应用密钥以及开发者配置的token

企业号:请把配置文件中的torpid 、corpsecret 、 key 、token 一栏换成自己企业号对应的CorpID 、 Secret 、企业号应用的AesKey 、以及对应应用开发者配置中的token

###编译及运行应用 进入项目根目录,直接go build编译项目即可

$ go build -o gochat main.go

创建成功以后,你能得到一个名叫gochat的应用程序,在有该程序的目录下输入

$nohup ./gochat &

即可运行该程序,然后在公共号/企业号的开发者配置中启用”服务器配置/回调模式“

token随意设置,将url 设置为: 域名/pub(企业号则是:域名/corp) 即可:

example: www.myhost.com/pub

启动”服务器配置/回调模式“,即可成功运行一个基础版的微信公共号/企业号gochat框架

gochat's People

Contributors

gislu avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.