Created
January 1, 2016 22:50
-
-
Save pwlin/c74036e095f687cdd8ac to your computer and use it in GitHub Desktop.
PM2 config example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"apps" : [{ | |
"name" : "worker-app", | |
"script" : "worker.js", | |
"args" : ["--toto=heya coco", "-d", "1"], | |
"watch" : true, | |
"node_args" : "--harmony", | |
"merge_logs" : true, | |
"cwd" : "/this/is/a/path/to/start/script", | |
"env": { | |
"NODE_ENV": "production", | |
"AWESOME_SERVICE_API_TOKEN": "xxx" | |
} | |
},{ | |
"name" : "api-app", | |
"script" : "api.js", | |
"instances" : 4, | |
"exec_mode" : "cluster_mode", | |
"error_file" : "./examples/child-err.log", | |
"out_file" : "./examples/child-out.log", | |
"pid_file" : "./examples/child.pid" | |
}] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment