Skip to content

Commit 8456b97

Browse files
committed
fix server paths
1 parent 135369e commit 8456b97

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

examples/parallax-example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
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>

examples/parallax-example/server.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ import { ParallaxExample } from 'components';
88

99
const 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

1413
app.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));

0 commit comments

Comments
 (0)