Created
May 18, 2015 06:22
-
-
Save TomoakiNagahara/af0f28c0a2e4e66319b1 to your computer and use it in GitHub Desktop.
pm2でプロセスを多重化しロードバランシングを行う ref: http://qiita.com/TomoakiNagahara/items/1a51bad888935c1c87f3
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
npm install pm2 -g |
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
pm2 start pm2-bootstrap.json |
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" : "public-tutorial", | |
"script" : "./app.js", | |
"instances" : 2, | |
"exec_mode" : "fork_mode", | |
"node_args" : "--stack-size=10240000", | |
"env" : { | |
"NODE_ENV": "localhost" | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment