如何在windows下部署leaf服务器

1.安装golang
https://golang.org/dl/](https://golang.org/dl/

2.配置环境
GOROOT,GOPATH=“E:/go/work/”

3.下载相关的环境
git clone https://github.com/name5566/leafserver
go get github.com/name5566/leaf 或者 git clone https://github.com/name5566/leaf E:/go/work/src/github.com/name5566/leaf
go get github.com/golang/protobuf/proto 或者 git clone https://github.com/golang/protobuf E:/go/work/src/github.com/golang/protobuf
go get gopkg.in/mgo.v2 或者 git clone https://gopkg.in/mgo.v2 E:/go/work/src/gopkg.in/mgo.v2
go get github.com/gorilla/websocket 或者 git clone https://github.com/gorilla/websocket E:/go/work/src/github.com/gorilla/websocket

4.编译安装
go install server
备注,编译过程中出现问题,e.g:


image.png

直接去下载对应的库即可

5.运行


image.png
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容