-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.js
More file actions
26 lines (21 loc) · 874 Bytes
/
run.js
File metadata and controls
26 lines (21 loc) · 874 Bytes
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
let exec = require('child_process').exec;
let path = require('path');
let iconsCatcher = exec(join('icons-catcher', 'auto.js'), (err, stdout, stderr) => {
if (err) console.error(err);
console.log(stdout.match(/info.*/)[0]);
});
let cmsCatch = exec(join('cms-catcher', 'auto.js'), (err, stdout, stderr) => {
if (err) console.error(err);
console.log(stdout.match(/info.*/)[0]);
});
let uplist = exec(join('uplist-auto', 'auto.js'), (err, stdout, stderr) => {
if (err) console.error(err);
console.log(stdout.match(/info.*/)[0]);
});
let server = exec(join('up-list', 'bin/www'), (err, stdout, stderr) => {
if (err) console.error(err);
console.log(stdout.match(/info.*/)[0]);
});
function join(path_, filename, logfile = 'forever.log') {
return `forever start -l ${path.join(__dirname, path_, logfile)} -a ${path_}/${filename}`;
}