服务器为Golang编写。
1.编译:
cd fish\
go build -o account.exe account\main\main.go account\main\init.go account\main\config.go
go build -o hall.exe hall\main\main.go hall\main\init.go hall\main\config.go
go build -o fish.exe game\main\main.go game\main\init.go game\main\config.go
2.解压客户端: tar -zxvf fish.tar.gz /var/www/html/client/fish
3.配置nginx:
server {
listen 80;
server_name fish.com;
charset utf8;
index index.html index.htm;
location /qq {
add_header Access-Control-Allow-Origin *;
proxy_set_header X-Target $request_uri;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:9000;
}
location / {
root /var/www/html/client/fish;
add_header Access-Control-Allow-Origin *;
expires 7d;
}
}
配置文件位置 /common/conf 内含redis配置和qq第三方登录配置,请自行修改。
——————————————————————–
免责声明:
1、转载或引用本站内容须注明原网址,并标明本网站网址中国源码
2、转载或引用本站中的署名文章,请按规定向原作者支付稿酬
3、本站所有资源均来自网络,不保证资源的完整性,仅供学习研究,如有侵权请联系客服删除
4、对于不当转载或引用本站内容而引起的民事纠纷、行政处理或其他损失,本网站不承担责任
5、本站所有资源不带任何技术支持,下载资源请24小时内删除,如用于违法用途,本站不承担任何法律或连带责任
6、对不遵守本声明或其他违法、恶意使用本网站内容者,本网站保留追究其法律责任的权利
7、若资源需要解压密码,则默认密码为:www.chinacode.com
本文链接:https://www.chinacode.com/13415.html
评论