diff --git a/envar-base-basic.js b/envar-base-basic.js index 43cfd2c..fddcc18 100644 --- a/envar-base-basic.js +++ b/envar-base-basic.js @@ -1,17 +1,12 @@ -module.exports={ - protocol: 'http', - host: 'localhost', +const inDev = global.inDev || global.envar?.inDev || process.env.NODE_ENV === 'development' + +module.exports = { + protocol: inDev ? 'http' : 'httpall', + host: inDev ? 'localhost' : 'vic-user.bittic.org', port: undefined, - - ENV_PRODUCTION: { - protocol: 'httpall', - host: 'vic-user.bittic.org', - // 如果使用 https 协议,必须填写以下内容,或在命令行参数中设置: - 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, - }, - -} \ No newline at end of file + 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, +}