Node 参数获取
2021-04-19 本文已影响0人
凡凡的小web
let args = process.argv.splice(2)
let customEnginePath = ""
args.forEach((arg) => {
var [key, value] = arg.split('=')
if (key === 'customEnginePath') {
customEnginePath = value
}
})
let args = process.argv.splice(2)
let customEnginePath = ""
args.forEach((arg) => {
var [key, value] = arg.split('=')
if (key === 'customEnginePath') {
customEnginePath = value
}
})