File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
examples/parallax-example Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 99</ head >
1010< body >
1111 < div id ="root "> $react</ div >
12- < script src ="static/bundle.js "> </ script >
12+ < script src ="/ static/bundle.js "> </ script >
1313</ body >
1414</ html >
Original file line number Diff line number Diff line change @@ -8,11 +8,10 @@ import { ParallaxExample } from 'components';
88
99const app = express ( ) ;
1010
11- app . use ( '/static' , express . static ( path . resolve ( __dirname , './' ) ) ) ;
12- // app.use('/static', express.static(__dirname));
11+ app . use ( '/static' , express . static ( path . resolve ( __dirname , './dist' ) ) ) ;
1312
1413app . get ( '*' , ( req , res ) => {
15- const html = fs . readFileSync ( path . resolve ( __dirname , '.. /index.html' ) ) . toString ( ) ;
14+ const html = fs . readFileSync ( path . resolve ( __dirname , './index.html' ) ) . toString ( ) ;
1615 const markup = ReactServer . renderToString ( < ParallaxExample /> ) ;
1716
1817 res . send ( html . replace ( '$react' , markup ) ) ;
You can’t perform that action at this time.
0 commit comments