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();