@@ -30,7 +30,8 @@ $ code-push login http://codepush.19910225.com:8080 #登录
3030
3131### 客户端eg.
3232
33- [ CodePushDemo] ( https://github.com/lisong/code-push-demo-app )
33+ [ ReactNative CodePushDemo] ( https://github.com/lisong/code-push-demo-app )
34+ [ Cordova CodePushDemo] ( https://github.com/lisong/code-push-cordova-demo-app )
3435
3536## INSTALL FROM NPM PACKAGE
3637
@@ -96,13 +97,13 @@ read [config.js](https://github.com/lisong/code-push-server/blob/master/config/c
9697## RUN
9798
9899``` shell
99- $ node ./bin/www
100+ $ node ./bin/www # or code-push-server
100101```
101102
102103or point config file and ENV
103104
104105``` shell
105- $ CONFIG_FILE=/path/to/config.js NODE_ENV=production node ./bin/www
106+ $ CONFIG_FILE=/path/to/config.js NODE_ENV=production node ./bin/www # or CONFIG_FILE=/path/to/config.js NODE_ENV=production code-push-server
106107```
107108
108109notice. you have to change ` loginSecret ` in config.js for security.
@@ -111,7 +112,7 @@ notice. you have to change `loginSecret` in config.js for security.
111112you can change like this.
112113
113114``` shell
114- $ PORT=3000 HOST=127.0.0.1 NODE_ENV=production node ./bin/www
115+ $ PORT=3000 HOST=127.0.0.1 NODE_ENV=production node ./bin/www # or PORT=3000 HOST=127.0.0.1 NODE_ENV=production code-push-server
115116```
116117
117118## code-push-cli
@@ -124,7 +125,7 @@ $ code-push login http://127.0.0.1:3000 #login in browser account:admin password
124125
125126[ code-push-cli source] ( https://github.com/Microsoft/code-push )
126127
127- ## react-native-code-push
128+ ## [ react-native-code-push] ( https://github.com/Microsoft/react-native-code-push ) for react-native
128129
129130``` shell
130131$ cd /path/to/project
@@ -162,8 +163,28 @@ protected List<ReactPackage> getPackages() {
162163}
163164```
164165
165- [ react-native-code-push source] ( https://github.com/Microsoft/react-native-code-push )
166166
167+ ## [ cordova-plugin-code-push] ( https://github.com/Microsoft/cordova-plugin-code-push ) for cordova
168+
169+ ``` shell
170+ $ cd /path/to/project
171+ $ cordova plugin add cordova-plugin-code-push@latest --save
172+ ```
173+
174+ ## config cordova project
175+
176+ edit config.xml. add code below.
177+
178+ ``` xml
179+ <platform name =" android" >
180+ <preference name =" CodePushDeploymentKey" value =" nVHPr6asLSusnWoLBNCSktk9FWbiqLF160UDg" />
181+ <preference name =" CodePushServerUrl" value =" http://codepush.19910225.com:8080/" />
182+ </platform >
183+ <platform name =" ios" >
184+ <preference name =" CodePushDeploymentKey" value =" Iw5DMZSIrCOS7hbLsY5tHAHNITFQqLF160UDg" />
185+ <preference name =" CodePushServerUrl" value =" http://codepush.19910225.com:8080/" />
186+ </platform >
187+ ```
167188
168189## Production Manage
169190use [ pm2] ( http://pm2.keymetrics.io/ ) to manage process.
0 commit comments