accessing route handler issues 404 error

I have this route handler at src/app/api/foo/route.ts:
export async function GET(_request: Request) {
return Response.json({ sup: "yo" });
}
export async function GET(_request: Request) {
return Response.json({ sup: "yo" });
}
but going to http://localhost:3000/api/foo issues this error:
404: NOT_FOUND
Code: NOT_FOUND
ID: dev1::1q4p8-1697936493642-3afd6458a45a
404: NOT_FOUND
Code: NOT_FOUND
ID: dev1::1q4p8-1697936493642-3afd6458a45a
when running vercel dev, which I need to run for accessing some api endpoints using golang serverless functions, but it works just fine when I run npm run dev. how to fix this?
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server