node内置module
os
const os = require('os');
// 获取系统的版本
const platform = os.platform()
const os = require('os');
const process = require('child_process');
var cmd=require('node-cmd');
const platform = os.platform()
console.log(platform)
if (platform.includes("win")) {
process.exec("deploy.cmd", function (err, b, c) {
console.log(err)
})
} else {
console.log(2)
}