Skip to content

Commit 9fdbcb2

Browse files
authored
Update README.md
1 parent 1fda482 commit 9fdbcb2

File tree

1 file changed

+101
-1
lines changed

1 file changed

+101
-1
lines changed

README.md

Lines changed: 101 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,101 @@
1-
# code-push-server-go
1+
# Code-Push-Server-Go
2+
CodePush Server Go is a CodePush progam server,Use with [code-push-go]()
3+
4+
## Support Version
5+
- mysql >= 8.0
6+
- golang >= 1.21.5
7+
- redis >= 5.0
8+
9+
## Support Client Version
10+
- [react-native-code-push](https://github.com/microsoft/react-native-code-push) >= 7.0
11+
12+
## Support Storage
13+
- Local
14+
- AWS S3
15+
- FTP
16+
## Before installation, please ensure that the following procedures have been installed
17+
- mysql
18+
- golang
19+
- redis
20+
## HOW TO INSTALL code-push-server
21+
22+
```shell
23+
git clone https://github.com/htdcx/code-push-server-go.git
24+
cd code-push-server-go
25+
import code-push.sql to mysql
26+
```
27+
### Configuration mysql,redis,storage
28+
``` shell
29+
cd config
30+
vi (app.json or app.dev.json or app.prod.json)
31+
# app.json
32+
{
33+
"mode":"dev" #run read config app.{mode}.json
34+
}
35+
# app.prod.json
36+
{
37+
"DBUser": {
38+
"Write": {
39+
"UserName": "",
40+
"Password": "",
41+
"Host": "127.0.0.1",
42+
"Port": 3306,
43+
"DBname": ""
44+
},
45+
"MaxIdleConns": 10,
46+
"MaxOpenConns": 100,
47+
"ConnMaxLifetime": 1
48+
},
49+
"Redis": {
50+
"Host": "127.0.0.1",
51+
"Prot": 6379,
52+
"DBIndex": 0,
53+
"UserName": "",
54+
"Password": ""
55+
},
56+
"CodePush": {
57+
"FileLocal":(local,aws,ftp),
58+
"Local":{
59+
"SavePath":"./bundels"
60+
},
61+
"Aws":{
62+
"Endpoint":"",
63+
"Region":"",
64+
"S3ForcePathStyle":true,
65+
"KeyId":"",
66+
"Secret":"",
67+
"Bucket":""
68+
},
69+
"Ftp":{
70+
"ServerUrl":"",
71+
"UserName":"",
72+
"Password":""
73+
}
74+
},
75+
"UrlPrefix": "/api",
76+
"ResourceUrl": (nginx config url or s3),
77+
"Port": ":8080",
78+
"TokenExpireTime": 30 (day)
79+
}
80+
81+
```
82+
#### Build
83+
``` shell
84+
#MacOS pack GOOS:windows,darwin
85+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o code-push-server-go(.exe) main.go
86+
87+
#Windows pack
88+
set GOARCH=amd64
89+
set GOOS=linux #windows,darwin
90+
go build -o code-push-server-go(.exe) main.go
91+
92+
#copy config/app.(model).json and config/app.json to run dir and run
93+
./code-push-server-go
94+
```
95+
#### Use [code-push-go]()
96+
``` shell
97+
./code-push-go login -u (userName) -p (password) -h (serverUrl)
98+
```
99+
100+
## License
101+
MIT License [read](https://github.com/htdcx/code-push-server-go/blob/main/LICENSE)

0 commit comments

Comments
 (0)