Hi,
I would like to use the edge functions on Vercel, but only thing I found is this for Next.js Streaming Data in Edge Functions | Vercel Docs so I tried the the ‘Other frameworks’ option and in Redwood documentation I didnt find anything .
So I tried combination:
import type { APIGatewayEvent, Context } from 'aws-lambda'
import { logger } from 'src/lib/logger'
export const config = {
runtime: 'edge',
};
export const handler = async (event: APIGatewayEvent, _context: Context) => {
logger.info(`${event.httpMethod} ${event.path}: edgeFunctionExample function`)
return {
statusCode: 200,
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
data: 'edgeFunctionExample function',
}),
}
}
To add config
with runtime: 'edge'
to redwood function but that didnt do anything
Does anyone have some experience with this?