Skip to content

Commit 00fdff8

Browse files
committed
fix readme
1 parent 26c336f commit 00fdff8

File tree

2 files changed

+36
-7
lines changed

2 files changed

+36
-7
lines changed

README.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

102103
or 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

108109
notice. 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.
111112
you 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
169190
use [pm2](http://pm2.keymetrics.io/) to manage process.

package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
{
22
"name": "code-push-server",
3-
"description": "CodePush service",
3+
"description": "CodePush service for react-native and cordova",
44
"version": "0.2.1",
55
"license": "MIT",
66
"repository": {
77
"type": "git",
88
"url": "git://github.com/lisong/code-push-server.git"
99
},
10+
"keywords": [
11+
"code-push",
12+
"react-native",
13+
"cordova",
14+
"services",
15+
"code",
16+
"push"
17+
],
1018
"author": {
1119
"name": "Tab Lee",
1220
"email": "lisong2010@gmail.com",

0 commit comments

Comments
 (0)