Skip to content

Commit cd914ef

Browse files
committed
production pm2
1 parent 485409d commit cd914ef

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,16 @@ protected List<ReactPackage> getPackages() {
8888
[react-native-code-push source](https://github.com/Microsoft/react-native-code-push)
8989

9090

91+
## Production Manage
92+
use [pm2](http://pm2.keymetrics.io/) to manage process.
93+
94+
```shell
95+
$ npm install pm2 -g
96+
$ cp docs/process.yml /path/to/production/process.yml
97+
$ vim /path/to/production/process.yml #configure your env.
98+
$ cp config/config.json /path/to/production/config.json
99+
$ vim /path/to/production/config.json #configure your env.
100+
$ pm2 start /path/to/production/process.yml
101+
```
102+
103+

‎docs/process.yml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apps:
2+
- script : /path/to/code-push-server/bin/www
3+
name : code-push-server
4+
watch : false
5+
env :
6+
NODE_ENV: production
7+
PORT: 3001
8+
CONFIG_FILE: /path/to/production/config.json

0 commit comments

Comments
 (0)