diff --git a/backend/server.js b/backend/server.js index 63dae8e..3c22743 100644 --- a/backend/server.js +++ b/backend/server.js @@ -40,3 +40,10 @@ app.post("/api/login", async (req, res) => { app.listen(port, () => { console.log(`Express backend server is running at http://localhost:${port}`); }); + +// error handling code +app.use((err, req, res, next) => { + // Log the error stack and send a generic error response + console.error(err.stack); + res.status(500).send("Something broke!"); +}); \ No newline at end of file diff --git a/client/src/main.tsx b/client/src/main.tsx index 12eb902..5b3f104 100644 --- a/client/src/main.tsx +++ b/client/src/main.tsx @@ -1,7 +1,7 @@ import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import "./index.css"; -import App from "../other/App.tsx"; +import App from "../src/App.tsx"; createRoot(document.getElementById("root")!).render(