From 910f23808ebcc996748fb7718db52018d2d0cc23 Mon Sep 17 00:00:00 2001 From: Lukian LEIZOUR Date: Tue, 15 Apr 2025 23:09:57 +0200 Subject: [PATCH] fix: fixed frontend (I hope so) --- back/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/back/index.js b/back/index.js index 6d5c579..429dcc2 100644 --- a/back/index.js +++ b/back/index.js @@ -27,6 +27,12 @@ function loadRoutes(folderName) { loadRoutes("api"); +app.use(express.static("public")); +app.get("*", (req, res) => { + res.sendFile(path.join(__dirname, "public", "index.html")); +}); + + app.listen(3000, () => { console.log(`Server listening on http://localhost:3000/`); });