Skip to content

Commit 3550b23

Browse files
committed
serve
1 parent adfdf76 commit 3550b23

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

server/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,4 +645,9 @@ app.get('/history', async (req, res) => {
645645
res.status(500).json({ status: 'error', message: 'An error occurred while fetching shipment data.' });
646646
}
647647
});
648+
app.use(express.static(path.join(__dirname, "../client/build")));
649+
// Catch-all route to serve React's `index.html`
650+
app.get("*", (req, res) => {
651+
res.sendFile(path.join(__dirname, "../client/build/index.html"));
652+
});
648653

0 commit comments

Comments
 (0)