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/`); });