1、mqant的获取及使用说明文档:
2、获取依赖包:
go get github.com/gorilla/mux
go get github.com/gorilla/websocket
go get github.com/streadway/amqp
go get github.com/golang/protobuf
go get github.com/golang/net/context
go get github.com/gogo/protobuf
go get github.com/opentracing/basictracer-go
go get github.com/opentracing/opentracing-go
go get github.com/yireyun/go-queue
go get github.com/eclipse/paho.mqtt.golang
go get github.com/liangdas/mqant
go get github.com/garyburd/redigo
go get sourcegraph.com/sourcegraph/appdash
go get sourcegraph.com/sourcegraph/appdash-data
go get过程中可能存在国内镜像被墙了的问题,就需要找到相应的国内地址重新go get。
3、IDE配置go build的导出路径(导出到bin)
打开liteIDE->查看->选项-> liteBuild->gosrc.xml。
gosrc.xml文件需修改的地方:
原文件(go build是在main.go文件所在路径生成.exe文件):
<custom id="TargetName" name = "TARGETNAME" value="(GOEXE)" readonly="true" escaped="true"/>
<action id="Build" img="build.png" key="Ctrl+B;F7" cmd="(BUILDARGS)" save="all" output="true" codec="utf-8" regex="$(ERRREGEX)" navigate="true"/>
修改后文件:(go build在项目目录下bin文件夹下生成.exe文件)
<custom id="TargetName" name = "TARGETNAME" value="../../bin/(GOEXE)" readonly="true" escaped="true"/>
<action id="Build" img="build.png" key="Ctrl+B;F7" cmd="(BUILDARGS) -o (ERRREGEX)" navigate="true"/>
4、修改server.conf文件的配置(运行网页版聊天系统的客户端需要的步骤)
在bin/conf/server.conf 中
//web静态文件路径
"WebRoot":"../../../mqantserver/bin/console",
...
"Webapp":[
{
"Id":"Webapp001",
"ProcessID":"development",
"Settings":{
"StaticPath":"../../../mqantserver/bin" //需要修改的部分,更改为你本机上mqantserver bin的绝对路径
}
}
],
有疑问加站长微信联系(非本文作者)