summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2018-02-21 15:28:56 +0000
committerGianni Ceccarelli <gianni.ceccarelli@broadbean.com>2018-02-21 15:28:56 +0000
commitdc5d27234eddb4065fe29a9cebafd2aa145ad43b (patch)
tree2b429f215bdcd259448f492556eebf2389a11bcd
parentadd pm2 (diff)
downloadcolor-dc5d27234eddb4065fe29a9cebafd2aa145ad43b.tar.gz
color-dc5d27234eddb4065fe29a9cebafd2aa145ad43b.tar.bz2
color-dc5d27234eddb4065fe29a9cebafd2aa145ad43b.zip
pm2 pieces
-rw-r--r--color.json17
-rw-r--r--package.json2
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": "",