File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -526,11 +526,11 @@ app.get(
526
526
//if in production mode, statically serve everything in the build folder on the route '/dist'
527
527
if ( process . env . NODE_ENV == 'production' ) {
528
528
console . log ( 'in production' ) ;
529
- console . log ( 'dirname : ' , __dirname ) ;
530
- app . use ( '/' , express . static ( path . join ( __dirname , '/build' ) ) ) ;
529
+ console . log ( 'joined path : ' , path . join ( __dirname , '../build' ) ) ;
530
+ app . use ( '/' , express . static ( path . join ( __dirname , '.. /build' ) ) ) ;
531
531
} else {
532
532
console . log ( 'not production' ) ;
533
- console . log ( 'dirname : ' , __dirname ) ;
533
+ console . log ( 'joined path : ' , path . join ( __dirname , '../build' ) ) ;
534
534
app . get ( '/' , ( req , res ) => {
535
535
const indexPath = path . join ( __dirname , '../index.html' ) ;
536
536
return res . status ( 200 ) . sendFile ( indexPath ) ;
You can’t perform that action at this time.
0 commit comments