Added routing for subfolders to other files + simple first frontend

This commit is contained in:
Janik 2025-07-20 10:43:27 +02:00
parent 76fb3332bf
commit 84ff8df612
14 changed files with 348 additions and 63 deletions

View file

@ -18,7 +18,8 @@ app.post("/api/shorten", (req, res) => {
[id, original_url],
(err) => {
if (err) return res.status(500).json({ error: err.message });
res.json({ short_url: `http://localhost:5173/${id}` });
res.json({ short_url: `http://localhost:3000/${id}` });
res.json({ id: `${id}`});
}
);
});