File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ import(`${configPath}/config.mjs`).then((module) => {
88 const config = module . default ;
99
1010 app . use (
11- config . base ,
12- express . static ( path . join ( fileURLToPath ( configPath ) , "dist" ) ) ,
11+ config . base || "/" ,
12+ express . static ( path . join ( fileURLToPath ( configPath ) , "dist" ) )
1313 ) ;
1414
1515 app . get ( "*" , ( req , res ) => {
@@ -18,10 +18,11 @@ import(`${configPath}/config.mjs`).then((module) => {
1818
1919 const port = process . env . PORT || config . port || 3000 ;
2020
21+ let message = `Server running on port ${ port } ` ;
22+ config . base && ( message += ` with base ${ config . base } ` ) ;
23+
2124 app . listen ( port , ( ) => {
22- console . log (
23- `\x1b[36m%s\x1b[0m` ,
24- `Server running on port ${ port } with base ${ config . base } ` ,
25- ) ;
25+ console . log ( `\x1b[36m%s\x1b[0m` , message ) ;
2626 } ) ;
2727} ) ;
28+
You can’t perform that action at this time.
0 commit comments