From 9fad7fcf61ba71dec7ed745aca4a19b1b191fe57 Mon Sep 17 00:00:00 2001 From: ogeobubu Date: Tue, 22 Oct 2024 14:31:02 +0100 Subject: [PATCH] new features --- src/app.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/app.ts b/src/app.ts index db7cb94..a62547f 100644 --- a/src/app.ts +++ b/src/app.ts @@ -16,4 +16,10 @@ app.use(express.json()); app.use('/api/images', imageRoutes); app.use('/uploads', express.static('uploads')); +app.use(express.static(path.join(__dirname, 'client', 'dist'))); + +app.get('*', (req, res) => { + res.sendFile(path.join(__dirname, 'client', 'dist', 'index.html')); +}); + export default app;