This commit is contained in:
陆柯 2022-07-21 16:36:55 +08:00
parent 4b9b784585
commit 0c327b9c42

View File

@ -14,10 +14,22 @@ const wo = (global.wo = {
['webSsl', '--webSsl <string>', 'SSL options in JSON string.'],
],
// 最基础的必须的默认配置,如果用户什么也没有提供
webProtocol: 'http',
webProtocol: process.env.NODE_ENV !== 'production' ? 'http' : 'httpall',
webHostname: 'localhost',
webRoot: '_webroot', // local path to serve as webroot
webPort: process.env.NODE_ENV !== 'production' ? 8338 : undefined,
webRoot: process.env.NODE_ENV !== 'production' ? 'unpackage/dist/build/h5' : '_webroot', // local path to serve as webroot
webIndex: 'index.html',
webSsl:
process.env.NODE_ENV !== 'production'
? undefined
: {
type: 'file', // greenlock or file
file: {
key: './ssl/privkey.pem', // ssl key file,
cert: './ssl/fullchain.pem', // ssl cert file,
ca: './ssl/chain.pem', // ssl ca file,
},
},
// 如果使用虚拟主机
/*
vhosts: [