Node 参数获取

let args = process.argv.splice(2)
let customEnginePath = ""
args.forEach((arg) => {
    var [key, value] = arg.split('=')
    if (key === 'customEnginePath') {
        customEnginePath = value
    }
})

推荐阅读更多精彩内容