diff options
author | Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> | 2018-02-21 15:28:56 +0000 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> | 2018-02-21 15:28:56 +0000 |
commit | dc5d27234eddb4065fe29a9cebafd2aa145ad43b (patch) | |
tree | 2b429f215bdcd259448f492556eebf2389a11bcd | |
parent | add pm2 (diff) | |
download | color-dc5d27234eddb4065fe29a9cebafd2aa145ad43b.tar.gz color-dc5d27234eddb4065fe29a9cebafd2aa145ad43b.tar.bz2 color-dc5d27234eddb4065fe29a9cebafd2aa145ad43b.zip |
pm2 pieces
-rw-r--r-- | color.json | 17 | ||||
-rw-r--r-- | package.json | 2 |
2 files changed, 18 insertions, 1 deletions
diff --git a/color.json b/color.json new file mode 100644 index 0000000..7106248 --- /dev/null +++ b/color.json @@ -0,0 +1,17 @@ +{ + "apps": [{ + "name": "color", + "script": "./index.js", + "exec_mode": "cluster", + "instances": 2, + "merge_logs": true, + "env": { + "watch": true, + "NODE_ENV": "development" + }, + "env_production" : { + "watch": false, + "NODE_ENV": "production" + } + }] +} diff --git a/package.json b/package.json index dcf40f2..ced8e64 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "", "main": "index.js", "scripts": { - "start": "node index.js", + "start": "node ./node_modules/.bin/pm2-runtime color.json", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", |