Problem with my api route
I created a dummy login api route under 'routes/api/login.ts' and when I call fetch on the url like so: it fails because that's an 'invalid route'
/api/loginconst serverA = Deno.serve(
{ port: 3000, hostname: "127.0.0.1" },
(_req) => new Response("Server A")
);
const serverB = Deno.serve(
{ port: 5000, hostname: "127.0.0.1" },
(_req) => new Response("Server B")
);
// How should Deno know which server the fetch
// should fetch from? Should it fetch from
// Server A or B? It's impossible to know.
fetch("/foo")