Skip to content

nghichcode/code-push-server

Repository files navigation

CodePush Server Node.js CI

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.

Support Storage mode

  • 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

CodePush Cli

check out the code-push-cli which works with server for manage apps and publish releases

Clients

How To Install code-push-server

Quick guide

Init Database (your database must not exits)

$ 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"

Config .env

Copy .env.example to .env and update config

Build

$ 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 replace 127.0.0.1 to your machine ip. example: http://dl.app/download
  • DATA_DIR (caclulate diff) change to your directory,make sure have read/write permissions.
  • TOKEN_SECRET get the random string from https://www.grc.com/passwords.htm, and replace the value INSERT_RANDOM_TOKEN_KEY.
  • db config: RDS_USERNAME, RDS_PASSWORD, RDS_DATABASE, RDS_HOST, RDS_PORT change to your own

Start Service

$ yarn start

DONE!!!!!!!

Default Account and Password

  • account: admin
  • password: 123456

FAQ

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published