From b9e929737559dbdcfdb0e95b409c84222cbae2bf Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Mon, 22 Mar 2021 14:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E6=8E=89=E5=91=BD=E4=BB=A4=E8=A1=8C?= =?UTF-8?q?=E5=8F=82=E6=95=B0=20env=E3=80=82=E5=A6=82=E6=9C=89=E9=9C=80?= =?UTF-8?q?=E8=A6=81=EF=BC=8C=E8=AF=B7=E7=94=A8=20process.env.NODE=5FENV?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/server.js b/server.js index 8438826..a9e43d2 100644 --- a/server.js +++ b/server.js @@ -6,10 +6,8 @@ const Config = require('so.sysconfig')({ // 命令行里可以接受的参数。将传给 config.js 里的 commander。每个参数的定义格式是 [参数名,参数键,描述],后两者用于传给commander,取值后覆盖掉Config里的同名变量。 ['protocol', '-P, --protocol ', 'Web Server protocol: http|https|httpall.'], ['host', '-H, --host ', 'Host IP or domain name, default to localhost.'], - ['port', '-p, --port ', 'HTTP port number.'], ['from', '-f, --from ', 'Path to serve as website'], - ['env', '-e, --env ', 'Runtime environment: production | development.'], ], // 最基础的必须的默认配置,如果用户什么也没有提供 protocol: 'http',