File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,8 @@ const yParser = require('yargs-parser');
1010const cmd = process . argv [ 2 ] ;
1111const argv = yParser ( process . argv . slice ( 3 ) ) ;
1212
13- // 全局环境模式
14- if ( argv . mode ) { // production, development
15- process . env . NODE_ENV = argv . mode || process . env . NODE_ENV || 'development' ;
16- }
13+ // 全局环境模式 production, development
14+ process . env . NODE_ENV = argv . mode || process . env . NODE_ENV || 'development' ;
1715
1816const { Service, logger } = require ( '@micro-app/core' ) ;
1917
Original file line number Diff line number Diff line change @@ -10,10 +10,8 @@ const HookEvent = require('./HookEvent');
1010
1111module . exports = function ( api , args = { } , devCb = false ) {
1212 const logger = api . logger ;
13- const isDev = process . env . NODE_ENV !== 'production' ;
14- if ( isDev ) {
15- logger . info ( 'Starting development server...' ) ;
16- }
13+ const isDev = api . mode === 'development' ;
14+ logger . info ( `Starting ${ api . mode } server...` ) ;
1715
1816 const serverConfig = api . serverConfig ;
1917
You can’t perform that action at this time.
0 commit comments