I'm using the app directory in the latest version of NextJS. I created the api folder inside of app/api/hello/route.ts where i have a route
w/ following code
export async function GET(){
return new Response('Hello World')
}
inside app directory i have a page called page.tsx w/ following code
import Image from 'next/image'
export default async function Home() {
const req = await fetch('/api/hello')
const data = await req.json()
return (
<>
{JSON.stringify(data)}
</>
)
}
when i run my app i get Error: Failed to parse URL from /api/hello why is this happening