根据 inDev 来设置dev和prod的不同环境变量值
This commit is contained in:
@@ -1,17 +1,12 @@
|
||||
module.exports={
|
||||
protocol: 'http',
|
||||
host: 'localhost',
|
||||
port: undefined,
|
||||
const inDev = global.inDev || global.envar?.inDev || process.env.NODE_ENV === 'development'
|
||||
|
||||
ENV_PRODUCTION: {
|
||||
protocol: 'httpall',
|
||||
host: 'vic-user.bittic.org',
|
||||
// 如果使用 https 协议,必须填写以下内容,或在命令行参数中设置:
|
||||
module.exports = {
|
||||
protocol: inDev ? 'http' : 'httpall',
|
||||
host: inDev ? 'localhost' : 'vic-user.bittic.org',
|
||||
port: undefined,
|
||||
sslType: 'file', // greenlock or file
|
||||
sslDomainList: ['vic-user.bittic.org'],
|
||||
sslKey: '/etc/letsencrypt/live/vic-server.bittic.org/privkey.pem', // ssl key file,
|
||||
sslCert: '/etc/letsencrypt/live/vic-server.bittic.org/fullchain.pem', // ssl cert file,
|
||||
sslCA: '/etc/letsencrypt/live/vic-server.bittic.org/bundle.pem', // ssl ca file,
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user