Skip to content

Commit 6b428d6

Browse files
committed
Fix routing from the address bar in prod mode
1 parent e74badf commit 6b428d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sample-01/server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,6 @@ app.use(
1717

1818
app.use(express.static(join(__dirname, "build")));
1919

20+
app.get('*', (req, res) => res.sendFile(join(__dirname, 'build', 'index.html')));
21+
2022
app.listen(port, () => console.log(`Server listening on port ${port}`));

0 commit comments

Comments
 (0)