随着 base.enviconfig 接受 configFiles 参数,修改调用参数格式

This commit is contained in:
陆柯 2022-04-24 16:42:58 +08:00
parent e66bd5be47
commit 52145c676e

View File

@ -3,7 +3,7 @@ const path = require('path')
const express = require('express')
const wo = (global.wo = {
envar : require('base.enviconfig').mergeConfig({
envar : require('base.enviconfig').mergeConfig({rawConfig: {
Commander_Option_List: [
// 命令行里可以接受的参数。将传给 config.js 里的 commander。每个参数的定义格式是 [参数名,参数键,描述]后两者用于传给commander取值后覆盖掉Config里的同名变量。
['Web_Protocol', '-P, --Web_Protocol <string>', 'Web protocol: http|https|httpall.'],
@ -23,7 +23,7 @@ const wo = (global.wo = {
{ Web_Root: 'dist', Web_Index: 'index.html', domainList: ['']}
],
*/
})
}})
})
if (typeof wo.envar.Web_Ssl === 'string') {
wo.envar.Web_Ssl = eval(`(${wo.envar.Web_Ssl})`)