From d7ae195bffc0bd0558971c66ae07e1cf51d59b9a Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Mon, 19 Sep 2022 12:05:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=8A=20inProd=20=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=9C=A8=E6=AF=8F=E4=B8=AA=E9=9C=80=E8=A6=81=E7=9A=84=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E5=86=85=E9=83=A8=EF=BC=8C=E8=80=8C=E4=B8=8D?= =?UTF-8?q?=E6=98=AF=E8=BF=9B=E8=A1=8C=E5=85=A8=E5=B1=80=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- envar-web-basic.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/envar-web-basic.js b/envar-web-basic.js index 04e123b..b8fd17b 100644 --- a/envar-web-basic.js +++ b/envar-web-basic.js @@ -1,5 +1,7 @@ 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',