Skip to content

Instantly share code, notes, and snippets.

@TomoakiNagahara
Created May 18, 2015 06:22
Show Gist options
  • Save TomoakiNagahara/af0f28c0a2e4e66319b1 to your computer and use it in GitHub Desktop.
Save TomoakiNagahara/af0f28c0a2e4e66319b1 to your computer and use it in GitHub Desktop.
pm2でプロセスを多重化しロードバランシングを行う ref: http://qiita.com/TomoakiNagahara/items/1a51bad888935c1c87f3
npm install pm2 -g
pm2 start pm2-bootstrap.json
{
"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