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.

34 lines
895 B
JavaScript

5 years ago
const AZL = require("../azeroth");
const path = require('path');
async function go() {
let scriptInfo = {
"script": path.join(__dirname, './bin/www'),
"cwd": path.join(__dirname, './'),
"args":[
// '-jar',
// path.join(__dirname, './springbootstart-web-1.0.0.jar'),
// '-Xms1000m',
// '-Xmx1000m',
// '--spring.profiles.active=prod',
],
"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();