Something went wrong. Try again.
A comprehensive digital solution dedicated to bridging the gap between those offering services and those seeking them, providing a centrali… gigwork.co.in
Something went wrong. Try again.
1234567891011121314151617181920212223import type { NextRequest } from 'next/server'import { getRequestContext } from '@cloudflare/next-on-pages'
export const runtime = 'edge'
export async function GET(request: NextRequest) { let responseText = 'Hello World'
// In the edge runtime you can use Bindings that are available in your application // (for more details see: // - https://developers.cloudflare.com/pages/framework-guides/deploy-a-nextjs-site/#use-bindings-in-your-nextjs-application // - https://developers.cloudflare.com/pages/functions/bindings/ // ) // // KV Example: // const myKv = getRequestContext().env.MY_KV_NAMESPACE // await myKv.put('suffix', ' from a KV store!') // const suffix = await myKv.get('suffix') // responseText += suffix
return new Response(responseText)}