File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -119,17 +119,22 @@ async function main() {
119119}
120120
121121if ( require . main === module ) {
122- // If no args, run benchmark
123- if ( process . argv . includes ( '--benchmark' ) ) {
124- main ( ) . then ( r => { console . log ( 'Results:' , r ) ; process . exit ( 0 ) ; } ) . catch ( e => { console . error ( e ) ; process . exit ( 1 ) ; } ) ;
125- } else if ( process . argv . includes ( '--server' ) ) {
122+ if ( process . argv . includes ( '--server' ) ) {
126123 const PORT = process . env . PORT || 3000 ;
127124 app . listen ( PORT , ( ) => {
128125 console . log ( `One API Gateway listening on port ${ PORT } ` ) ;
129126 } ) ;
130127 } else {
131- // Original behavior default: run benchmark
132- main ( ) . then ( r => { console . log ( 'Results:' , r ) ; process . exit ( 0 ) ; } ) . catch ( e => { console . error ( e ) ; process . exit ( 1 ) ; } ) ;
128+ // Default to benchmark if no --server flag
129+ main ( )
130+ . then ( r => {
131+ console . log ( 'Results:' , r ) ;
132+ process . exit ( 0 ) ;
133+ } )
134+ . catch ( e => {
135+ console . error ( e ) ;
136+ process . exit ( 1 ) ;
137+ } ) ;
133138 }
134139}
135140
You can’t perform that action at this time.
0 commit comments