-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.config.js
37 lines (36 loc) · 875 Bytes
/
main.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
var worker = {
name : 'ServerWS',
script : 'java',
cwd : "C:/Users/sarthak_z9/Desktop/minor2A",
exec_interpreter: "none",
exec_mode : "fork",
instances : 1,
args: [
"-Xmx50m",
"-cp",
"BBB.jar",
"com.asambhava.groupchatws.ServerWS"
],
env: {
PORT : 9000
},
env_production : {
NODE_ENV: 'production'
},
max_restarts : 10,
}
var Allapps=[];
for(var i=0;i<=3;i++)
{
Allapps[i] = JSON.parse(JSON.stringify(worker));
Allapps[i].name = worker.name+'_'+i;
Allapps[i].env.PORT = parseInt(worker.env.PORT)+i;
}
console.log(Allapps);
module.exports = {
/**
* Application configuration section
* http://pm2.keymetrics.io/docs/usage/application-declaration/
*/
apps : Allapps
};