CodePush Server is a CodePush program server. The official Microsoft CodePush service is slow in China, therefore we use this to host our own server.
- local: store bundle files in local machine
- qiniu: store bundle files in qiniu
- s3: store bundle files in aws
- oss: store bundle files in aliyun
- tencentcloud: store bundle files in tencentcloud
check out the code-push-cli which works with server for manage apps and publish releases
- docker (recommended)
- manual operation
$ yarn run init --dbhost "mysql_host" --dbport "mysql_port" --dbuser "mysql_user" --dbpassword "mysql_password" --dbname "mysql_dbname"
Example:
$ yarn run init --dbhost "127.0.0.1" --dbport "3306" --dbuser "username" --dbpassword "password" --dbname "codepush"
Copy .env.example to .env and update config
$ yarn build
some config items have to be changed:
STORAGE_DIR
(store the data) change to your directory, make sure have read/write permissions.DOWNLOAD_URL
replace127.0.0.1
to your machine ip. example: http://dl.app/downloadDATA_DIR
(caclulate diff) change to your directory,make sure have read/write permissions.TOKEN_SECRET
get the random string fromhttps://www.grc.com/passwords.htm
, and replace the valueINSERT_RANDOM_TOKEN_KEY
.db
config:RDS_USERNAME
,RDS_PASSWORD
,RDS_DATABASE
,RDS_HOST
,RDS_PORT
change to your own
$ yarn start
- account:
admin
- password:
123456
- modify password
- code-push-server normal solution (CN)
- targetBinaryVersion support
*
1.2.3
1.2
/1.2.*
1.2.3 - 1.2.7
>=1.2.3 <1.2.7
~1.2.3
^1.2.3