Added routing for subfolders to other files + simple first frontend
This commit is contained in:
parent
76fb3332bf
commit
84ff8df612
14 changed files with 348 additions and 63 deletions
|
|
@ -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}`});
|
||||
}
|
||||
);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue