You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
732 B
JavaScript
30 lines
732 B
JavaScript
|
|
const AZL = require("../azeroth");
|
|
const path = require('path');
|
|
|
|
async function go() {
|
|
let scriptInfo = {
|
|
"script": path.join(__dirname, './bin/www'),
|
|
"cwd": path.join(__dirname, './'),
|
|
"args":[
|
|
'--node_env=production'
|
|
],
|
|
"name": "logistics_node",
|
|
"log_date_format": "YYYY-MM-DD HH:mm Z"
|
|
}
|
|
await AZL.axios.post('http://127.0.0.1:8172/pm2server/cmd', {
|
|
cmd: "stop",
|
|
param: scriptInfo
|
|
}).catch(function (error) {
|
|
console.log(error);
|
|
});
|
|
|
|
await AZL.axios.post('http://127.0.0.1:8172/pm2server/cmd', {
|
|
cmd: "start",
|
|
param: scriptInfo
|
|
}).catch(function (error) {
|
|
console.log(error);
|
|
});
|
|
}
|
|
go();
|