21 lines
681 B
JavaScript
21 lines
681 B
JavaScript
const coretool = require('wo-core-toolkit')
|
|
|
|
const inProd = process.env.NODE_ENV === 'production' // 用 'production' 测试,以防在某些场景里 NODE_ENV 未定义。
|
|
|
|
module.exports = {
|
|
webProtocol: inProd ? 'httpall' : 'http',
|
|
webHostname: inProd ? 'vic-user.bittic.org' : 'localhost',
|
|
webPort: inProd ? undefined : coretool.PORT_WEB_SERVER_DEV,
|
|
webRoot: 'dist',
|
|
webSsl: inProd
|
|
? {
|
|
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,
|
|
},
|
|
}
|
|
: undefined,
|
|
}
|